finom / uniquestring

Simple function which generates pseudo-random string based on current timestamp and Math.random call

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uniquestring npm version

Super simple function which generates pseudo-random string based on current timestamp and Math.random call.

import uniqueString from 'uniquestring';

const unique = uniqueString(); // returns something similar to 1bl73a23duqt
const uniquePrefixed = uniqueString('foo_'); // returns something similar to foo_1bl73a23duqt

Installing

npm install uniquestring

or

<script src="path/to/uniquestring.js"></script>

About

Simple function which generates pseudo-random string based on current timestamp and Math.random call

License:MIT License


Languages

Language:JavaScript 100.0%