How to use uid2 - 6 common examples

To help you get started, we’ve selected a few uid2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geut / chan / test / commands / helpers / tmpdir.js View on Github external
create(subpath) {
            const resultPath = path.join(uniqueDir, subpath, uid2(6));
            mkdirp.sync(resultPath);
            return resultPath;
        },
        remove() {
github geut / chan / test / commands / helpers / tmpdir.js View on Github external
export default function tmpdir() {
    const uniqueDir = path.join(osTmpdir(), uid2(20));

    return {
        create(subpath) {
            const resultPath = path.join(uniqueDir, subpath, uid2(6));
            mkdirp.sync(resultPath);
            return resultPath;
        },
        remove() {
            return del(uniqueDir);
        }
    };
}
github rauchg / clif / lib / phantom.js View on Github external
frame(frame, fn){
    let file = join(tmpdir(), uid(8) + '.png');
    this.call('frame', [frame, file]);
    this.once('frame', function(){
      readFile(file, (err, buf) => {
        if (err) return this.emit('error', err);
        fn(buf);
        unlink(file);
      });
    });
  }
github robin98sun / koa-jwt-redis-session / src / index.js View on Github external
static generateSessionId (header){
        if(!header){
            return uid(24);
        }else{
            return header+":"+uid(24);
        }
    }
github robin98sun / koa-jwt-redis-session / src / index.js View on Github external
static generateSessionId (header){
        if(!header){
            return uid(24);
        }else{
            return header+":"+uid(24);
        }
    }

uid2

strong uid

MIT
Latest version published 3 years ago

Package Health Score

62 / 100
Full package analysis

Popular uid2 functions

Similar packages