All Projects → coreh → uid2

coreh / uid2

Licence: MIT license
Generate unique ids.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to uid2

The-Learning-Documentation-Project
This documentation is about the new learning(s) and issue(s) resolvings on different aspects of academic, professional and personal thoughts. It includes(or/with links): Research topics(& resources), Programming(issues and code), Advanced Linux commands, Networking commands, bash script command utilization, Linux packages(& scripts), Machinine l…
Stars: ✭ 27 (-34.15%)
Mutual labels:  uid
strapi-plugin-sitemap
🔌 Generate a highly customizable sitemap XML in Strapi CMS
Stars: ✭ 136 (+231.71%)
Mutual labels:  uid
node-uid-generator
Generates cryptographically strong pseudo-random UIDs with custom size and base-encoding
Stars: ✭ 21 (-48.78%)
Mutual labels:  uid
simpleflakes
Fast and test-driven distributed 64-bit ID generation, using pure JavaScript, for Node.js.
Stars: ✭ 32 (-21.95%)
Mutual labels:  uid
base64uid
Generate UID like YouTube
Stars: ✭ 52 (+26.83%)
Mutual labels:  uid
KSUID
Sortable UIDs in Python
Stars: ✭ 83 (+102.44%)
Mutual labels:  uid
fuuid
Functional UUIDs for Python.
Stars: ✭ 145 (+253.66%)
Mutual labels:  uid
uid
Provides an object-oriented API to generate and represent UIDs.
Stars: ✭ 315 (+668.29%)
Mutual labels:  uid

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].