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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nv-facutil-rid-pool

v1.0.5

Published

nv-facutil-rid-local ======================= - small fixed layer nest id pool - for size \< 100000

Downloads

3

Readme

nv-facutil-rid-local

  • small fixed layer nest id pool
  • for size < 100000

install

  • npm install nv-facutil-rid-local

usage

      const {creat,load,dump} = require("nv-facutil-rid-local");    

example

            var pool = creat(["uname","utoken","usess"])
        /*
        > pool.types
        [ 'uname', 'utoken', 'usess' ]
        > 
        */
            var id = pool.addrt();
            pool.id2typ(id);
        /*
        > pool.id2typ(id)
        'uname'
        */
            var cid = pool.addch(id);
            pool.id2typ(cid)
        /*
            > pool.id2typ(cid)
            'utoken'
        */ 
            id;
            cid;
            pool.addch(id);
            pool.addch(id);
            pool.addch(id);
        /*
        >     id;
        'uhjbgrikguhcmbkclbngxkdomyfhfkgcykth'
        >     cid;
        'avjgztjcojwddhiybsacdrtoqalihclelahk'
        >     pool.addch(id);
        'ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg'
        >     pool.addch(id);
        'jfedxwolxglatgfjjqhzxqijnlgawbbglldg'
        >     pool.addch(id);
        'sijidfqdkgkzfbkazpiaefiqjhshsdqulqci'
        > 
        */
        pool.chcnt(id)
        //4
        pool.chs(id)
        /*
        [
          'avjgztjcojwddhiybsacdrtoqalihclelahk',
          'ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg',
          'jfedxwolxglatgfjjqhzxqijnlgawbbglldg',
          'sijidfqdkgkzfbkazpiaefiqjhshsdqulqci'
        ]
        */
        var child0_of_cid = pool.addch(cid)
        pool.id2typ(child0_of_cid)
        /*
        > pool.id2typ(child0_of_cid)
        'usess'
        > 
        */
        var child1_of_cid = pool.addch(cid)
        child0_of_cid;
        child1_of_cid;
        /*
        > child0_of_cid;
        'zardhwzukpwreklitopbhjbgbqyisnkttcmd'
        > child1_of_cid;
        'mcahxoigvixehbjnaqellwvanexffschrbva'
        > 
        */
        pool.dict(id)

        /*
        > pool.dict(id)
        {
          avjgztjcojwddhiybsacdrtoqalihclelahk: {
            zardhwzukpwreklitopbhjbgbqyisnkttcmd: null,
            mcahxoigvixehbjnaqellwvanexffschrbva: null
          },
          ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg: {},
          jfedxwolxglatgfjjqhzxqijnlgawbbglldg: {},
          sijidfqdkgkzfbkazpiaefiqjhshsdqulqci: {}
        }
        > 
        */

        pool.pr(cid) === id
        //true
        pool.plances(child0_of_cid)
        /*
        > pool.plances(child0_of_cid)
        [
          'uhjbgrikguhcmbkclbngxkdomyfhfkgcykth',
          'avjgztjcojwddhiybsacdrtoqalihclelahk',
          'zardhwzukpwreklitopbhjbgbqyisnkttcmd'
        ]
        > id
        'uhjbgrikguhcmbkclbngxkdomyfhfkgcykth'
        > 
        */

        dump(pool)
        /*
        {
          uhjbgrikguhcmbkclbngxkdomyfhfkgcykth: {
            avjgztjcojwddhiybsacdrtoqalihclelahk: {
              zardhwzukpwreklitopbhjbgbqyisnkttcmd: null,
              mcahxoigvixehbjnaqellwvanexffschrbva: null
            },
            ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg: {},
            jfedxwolxglatgfjjqhzxqijnlgawbbglldg: {},
            sijidfqdkgkzfbkazpiaefiqjhshsdqulqci: {}
          }
        }
        > 
        */

        var rt2 = pool.addrt();
        rt2;
        dump(pool);

        /*
        {
          uhjbgrikguhcmbkclbngxkdomyfhfkgcykth: {
            avjgztjcojwddhiybsacdrtoqalihclelahk: {
              zardhwzukpwreklitopbhjbgbqyisnkttcmd: null,
              mcahxoigvixehbjnaqellwvanexffschrbva: null
            },
            ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg: {},
            jfedxwolxglatgfjjqhzxqijnlgawbbglldg: {},
            sijidfqdkgkzfbkazpiaefiqjhshsdqulqci: {}
          },
          gamtanyfclimbkgfisiumznnzhslvcehhxej: {}
        }
        */



        child0_of_cid;
        pool.del_id_and_empty_ances(child0_of_cid);

        /*
        > dump(pool)
        {
          uhjbgrikguhcmbkclbngxkdomyfhfkgcykth: {
            avjgztjcojwddhiybsacdrtoqalihclelahk: { mcahxoigvixehbjnaqellwvanexffschrbva: null },
            ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg: {},
            jfedxwolxglatgfjjqhzxqijnlgawbbglldg: {},
            sijidfqdkgkzfbkazpiaefiqjhshsdqulqci: {}
          },
          gamtanyfclimbkgfisiumznnzhslvcehhxej: {}
        }
        > 
        */
        child1_of_cid;
        pool.del_id_and_empty_ances(child1_of_cid);               // 
        /*
        > dump(pool)
        {
          uhjbgrikguhcmbkclbngxkdomyfhfkgcykth: {
            ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg: {},
            jfedxwolxglatgfjjqhzxqijnlgawbbglldg: {},
            sijidfqdkgkzfbkazpiaefiqjhshsdqulqci: {}
          },
          gamtanyfclimbkgfisiumznnzhslvcehhxej: {}
        }
        > 
        */


        var dumped = {
            uhjbgrikguhcmbkclbngxkdomyfhfkgcykth: {
              avjgztjcojwddhiybsacdrtoqalihclelahk: {
                zardhwzukpwreklitopbhjbgbqyisnkttcmd: null,
                mcahxoigvixehbjnaqellwvanexffschrbva: null
              },
              ykthrmdkjwtxkmvhiwssyudsbjefanhybdwg: {},
              jfedxwolxglatgfjjqhzxqijnlgawbbglldg: {},
              sijidfqdkgkzfbkazpiaefiqjhshsdqulqci: {}
            },
            gamtanyfclimbkgfisiumznnzhslvcehhxej: {}
        }

        var pool2 = load(dumped,["uname","utoken","usess"])

METHODS

    pool._chdict                 pool._del                    pool.add_nest                pool.addch                   pool.addrt                   pool.chcnt
    pool.chs                     pool.constructor             pool.del                     pool.del_id_and_empty_ances  pool.dict                    pool.exist           
    pool.plexist
    pool.get_desc                pool.get_lyr                 pool.get_roots               pool.id2tid                  pool.id2typ                  pool.is_empty_non_leaf
    pool.is_leaf                 pool.is_rt                   pool.plances                 pool.pr                      pool.tid2id                  pool.tid2typ
    
    pool.types

APIS

  {
    creat: [Function: creat],
    load: [Function: load],
    dump: [Function: dump]
  }

LICENSE

  • ISC