You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

cross-uid

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-uid

Generate a randomize identifer with fixed length ⚡.


Version published
Maintainers
1
Created

Readme

Source

Cross Unique Id


Build Status    Coverage Status    NPM version    License    Code Size    Code of Conduct

Generate a randomize identifer with fixed length ⚡.

  • 🔥 Blaze, Simple and lightweight.
  • ✨ Polyfill Unique Id (Browser + Node.js).
  • ⚖️ Tiny Size.

Installation

# npm ..
$ npm install cross-uid
# yarn ..
$ yarn add cross-uid

Usage

This is a practical example of how to use.

const uid = require("cross-uid");

// you can pass a optional length arg to this func.
// the default value of length is 12.
// const myUniqueId = uid();
const myUniqueId = uid(15);

// Result:
//  console.log(myUniqueId);
//  Treminal
//  $your_pc_name_with_your_directory
//  'xxxxxxxxxx'

__Important: Your risk of collisions decreases with longer strings!__

License

MIT © Imed Jaberi

Keywords

FAQs

Package last updated on 25 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc