JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16074760
  • Score
    100M100P100Q235901F
  • License MIT

Generate a cryptographically strong random string

Package Exports

  • crypto-random-string

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (crypto-random-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

crypto-random-string Build Status

Generate a cryptographically strong random string

Can be useful for creating an identifier, slug, salt, fixture, etc.

Install

$ npm install crypto-random-string

Usage

const cryptoRandomString = require('crypto-random-string');

cryptoRandomString(10);
//=> '2cf05d94db'

API

cryptoRandomString(length)

Returns a hex string.

length

Type: number

Length of the returned string.

License

MIT © Sindre Sorhus