|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
614 bytes
|
| Line | |
|---|
| 1 | # unique-string [](https://travis-ci.org/sindresorhus/unique-string)
|
|---|
| 2 |
|
|---|
| 3 | > Generate a unique random string
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | ## Install
|
|---|
| 7 |
|
|---|
| 8 | ```
|
|---|
| 9 | $ npm install unique-string
|
|---|
| 10 | ```
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | ## Usage
|
|---|
| 14 |
|
|---|
| 15 | ```js
|
|---|
| 16 | const uniqueString = require('unique-string');
|
|---|
| 17 |
|
|---|
| 18 | uniqueString();
|
|---|
| 19 | //=> 'b4de2a49c8ffa3fbee04446f045483b2'
|
|---|
| 20 | ```
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | ## API
|
|---|
| 24 |
|
|---|
| 25 | ### uniqueString()
|
|---|
| 26 |
|
|---|
| 27 | Returns a 32 character unique string. Matches the length of MD5, which is [unique enough](https://stackoverflow.com/a/2444336/64949) for non-crypto purposes.
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | ## License
|
|---|
| 31 |
|
|---|
| 32 | MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.