npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nv-facutil-dual-cursor

v1.0.1

Published

nv-facutil-dual-cursor =============== - nv-facutil-dual-cursor simple util for start-index AND end-index

Readme

nv-facutil-dual-cursor

  • nv-facutil-dual-cursor simple util for start-index AND end-index

install

  • npm install nv-facutil-dual-cursor

usage

const creat = require("nv-facutil-dual-cursor")

example

    var dual = creat()

    > dual
    D { front: 0, back: 0 }
    >

    > dual.ff1()
    1
    > dual
    D { front: 1, back: 0 }
    >

    > dual.ffn(3)
    4
    > dual
    D { front: 4, back: 0 }
    >

    > dual.mid_
    2
    >
    > dual.ffn(2)
    6
    > dual
    D { front: 6, back: 0 }
    >

    > dual.fb1()
    5
    > dual
    D { front: 5, back: 0 }
    >


    > dual.bf1()
    1
    > dual
    D { front: 5, back: 1 }
    > dual.bfn(2)
    3
    > dual
    D { front: 5, back: 3 }
    > dual.bfn(8)                //invalid no effect

    > dual
    D { front: 5, back: 3}              
    >

    > dual.ffn(8)
    13
    > dual
    D { front: 13, back: 3 }
    >

    > dual.fbn(15)                 //invalid no effect
    13
    > dual
    D { front: 13, back: 3 }
    >

    > dual.db1()
    D { front: 12, back: 2 }
    > dual.dfn(3)
    D { front: 15, back: 5 }
    >


    > dual.mid_
    10
    > dual.fst_half_
    [ 5, 10 ]
    > dual.snd_half_
    [ 10, 16 ]
    >

    > dual.bf1()
    6
    > dual
    D { front: 15, back: 6 }
    >
    > dual.mid_
    null
    >
    > dual.fst_half_
    [ 6, 11 ]
    > dual.snd_half_
    [ 11, 16 ]
    >
    > dual.slice([10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170])
    [
       70,  80,  90, 100,
      110, 120, 130, 140,
      150, 160
    ]
    e

    > dual.fst_half_slice([10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170])
    [ 70, 80, 90, 100, 110 ]
    >


    > dual.snd_half_slice([10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170])
    [ 120, 130, 140, 150, 160 ]
    >

METHODS

    fb1         front-backforward-1-step
    fbn(n)      front-backforward-n-step
    ff1         front-frontforward-1-step
    ffn(n)      front-frontforward-n-step


    bb1         back-backforward-1-step
    bbn(n)      back-backforward-n-step
    bf1         back-frontforward-1-step
    bfn(n)      back-frontforward-n-step


    db1         both-backforward-1-step
    dbn(n)      both-backforward-n-step
    df1         both-frontforward-1-step
    dfn(n)      both-frontforward-n-step


    _xxx        without-check

    ////
    follow_me:          this.back = this.front
    wait_me:            this.front = this.back

    fst_half_     
         IF odd-length:      
             ---back...mid...front---        back...
         ELSE
             ---back...lmid,rmid...front---   back...lmid<included>    
    snd_half_           
         IF odd-length:
             ---back...mid...front---        ...front<included>
         ELSE
            ---back...lmid,rmid...front---   rmid...front<included>


    mid_     null IF even-length

    lmid_    null IF odd-length  
    rmid_    null IF odd-length


    x._bb1                  x._bbn                  x._bf1                  x._bfn
    x._db1                  x._dbn                  x._fb1                  x._fbn
    x.bb1                   x.bbn                   x.bf1                   x.bfn
    x.can_bb1               x.can_bbn               x.can_bf1               x.can_bfn
    x.can_db1               x.can_dbn               x.can_fb1               x.can_fbn
    x.db1                   x.dbn                   x.df1
    x.dfn                   x.fb1                   x.fbn                   x.ff1
    x.ffn                   x.follow_me             x.fst_half_             x.fst_half_slice
    x.has_mid               x.is_overlap            x.mid_                  x.slice
    x.snd_half_             x.snd_half_slice        x.wait_me

    x.back                  x.front

LICENSE

  • ISC