nanostring

1.0.1 • Public • Published

nanostring

A super simple random string generator. An alternative to nanoid which lately became notoriously difficult to import.

How to use

Installation:

npm i nanostring

Import:

import { nanostring } from 'nanostring';

Or:

const nanostring = require('nanostring').nanostring;

Usage:

nanostring(length: 16, args: { lowercase: true, uppercase: false,  numbers: true });

By default, nanostring() will give you a random string of 16 lowercase letters and numbers.

Specify the length as: nanostring(8) to change the length. Boundaries are 1 to 65535.

The arguments object can change the contents of the string. If you turn off all three, you'll get question marks.

Package Sidebar

Install

npm i nanostring

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.78 kB

Total Files

6

Last publish

Collaborators

  • tomcatmwi