@zcorky/random
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

random

NPM version NPM quality Coverage Status Dependencies Build Status Known Vulnerabilities NPM download license issues

Random number, random string, random from anything>

Install

$ npm install @zcorky/random

Usage

// typescript, see more in test
import random, { string, from as randomFrom } from '@zcorky/random';

random(0, 10); // random one integer value
// => 8

string(8); // random string, length is 8
// => cdef19ED

randomFrom([ // random one from array of string
  'http://example11.com',
  'http://example12.com',
  'http://example13.com',
]);

randomFrom([ // random 2 from array of string
  'http://example11.com',
  'http://example12.com',
  'http://example13.com',
], 2);
// => ['http://example11.com', 'http://example13.com']

License

MIT © Moeover

Package Sidebar

Install

npm i @zcorky/random

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

6.38 kB

Total Files

11

Last publish

Collaborators

  • uniquecolesmith