1.0.0 • Published 4 years ago

uid2 v1.0.0

Weekly downloads
702,163
License
MIT
Repository
github
Last release
4 years ago

uid2

NPM version

Generate unique ids. Pass in a length and it returns a string.

Installation

npm install uid2

Examples

Without a callback it is synchronous:

const uid = require('uid2');

const id = uid(10);
// id => "hbswt489ts"

With a callback it is asynchronous:

const uid = require('uid2');

uid(10, function (err, id) {
  if (err) throw err;
  // id => "hbswt489ts"
});

Imported via uid2/promises it returns a Promise:

const uid = require('uid2/promises');

async function foo() {
  const id = await uid(10);
  // id => "hbswt489ts"
}

License

MIT

@md-app/loopback-component-oauth2-serversocket.io-redis-forkkoa.session@cloudhub-js/sails-sockets@infinitebrahmanuniverse/nolb-uid@zhaow-de/oauth2orize@zhaow-de/passport-oauth2@everything-registry/sub-chunk-3006symple-locksympletennavw-socket.io-rediswotoauth2orizesyclesycle-component-oauth2sycle-corevideofyvideofy-plusvf@dmapper/passport-oauth2@crolarbah/passport-wsfed-saml2@credo/io-emitter@desunit/passport-apple@blueberry6401/socker.io-redis-adapter@poziworld/oauth2orizejulianuphoff-oauth2orizeip-to-countrykastor-depskastor-npmk-socket.io-redisjsonrpc.js@futureverse/passport-tiktoksparklybotsocket.io-adapter-mongoosesolid-jobsolid-projectuhuratokenstore@arendajaelu/nestjs-passport-apple@ciscospaces/redis-adapter@activelylearn/passport-clever-oauth20@acceleratxr/passport-oauth2@davidzemon/passport-okta-oauthyoumeb-usersyoumen-idmunique-temp-dirurl-extract@flaque/socket.io-redis@flat/passport-apple@flat/socket.io-redis@gitterhq/passport-oauth2@infurnia/redis-adapter@lwyj123/oauth2js@mainmeta/passport-oauth2-dotwallet@mickl/socket.io-nats-adapter@mother/socket.io-adapter-mongo@nhuttm/socket.io-redis@nicokaiser/passport-apple@nodebb/socket.io-adapter-mongo@joewitt99/passport-dynamicoauth2@immers-space/oauth2orize@omneedia/passport-adfs@omneedia/passport-oauth2@omneedia/socket.io-adapter-mongo@qortor/oauth2orize@sailshq/socket.io-redis@sansitech/loopback@realmikesolo/passport-oauth2@novembrecom/zxcvbn@peulda/passport-apple@pelagiccreatures/marlin@slyg/sketch-parser@socket.io/redis-adaptermservice-calendarms-socket.io-adapter-amqpmydbmydb-exposemoauth2microfly2008-loopbackmyoauth2osthumbonesessionopenauthoneauthoauth_serveoauth2orize-koa-froauth2orize-koa2oauth2orize-restifyoauth2orizeoauth2orize-aburkutoauth2orize-koaoauth2orize_customoidcpassport-el-oauth2passport-firebase-authpassport-firebase-authenticationpassport-ukrpassport-vsopassport-vso-custompassport-vso-oauth
1.0.0

4 years ago

0.0.4

4 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago