Comparing version 1.0.4 to 1.0.5
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 1.0.5 | ||
* Reduce `nanoid/index` size (by Anton Khlynovskiy). | ||
## 1.0.4 | ||
@@ -5,0 +8,0 @@ * Reduce npm package size. |
var random = require('./random') | ||
var url = require('./url') | ||
var url = '_~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
/** | ||
@@ -6,0 +5,0 @@ * Generate secure URL-friendly unique ID. |
{ | ||
"name": "nanoid", | ||
"version": "1.0.4", | ||
"description": "A tiny (162 bytes), secure URL-friendly unique string ID generator", | ||
"version": "1.0.5", | ||
"description": "A tiny (146 bytes), secure URL-friendly unique string ID generator", | ||
"keywords": [ | ||
@@ -15,3 +15,4 @@ "uuid", | ||
"browser": { | ||
"./random.js": "./random-browser.js" | ||
"./random.js": "./random.browser.js", | ||
"./index.js": "./index.browser.js" | ||
}, | ||
@@ -22,8 +23,8 @@ "devDependencies": { | ||
"docdash": "^0.4.0", | ||
"eslint": "^4.19.1", | ||
"eslint": "^5.0.1", | ||
"eslint-ci": "^0.1.1", | ||
"eslint-config-logux": "^23.0.0", | ||
"eslint-config-logux": "^23.0.2", | ||
"eslint-config-standard": "^11.0.0", | ||
"eslint-plugin-es5": "^1.3.1", | ||
"eslint-plugin-import": "^2.12.0", | ||
"eslint-plugin-import": "^2.13.0", | ||
"eslint-plugin-jest": "^21.17.0", | ||
@@ -35,3 +36,3 @@ "eslint-plugin-node": "^6.0.1", | ||
"html-webpack-plugin": "^3.2.0", | ||
"jest": "^23.1.0", | ||
"jest": "^23.3.0", | ||
"jsdoc": "^3.5.5", | ||
@@ -44,4 +45,5 @@ "lint-staged": "^7.2.0", | ||
"size-limit": "^0.18.3", | ||
"uuid": "^3.2.1", | ||
"webpack": "^4.12.0", | ||
"svgo": "^1.0.5", | ||
"uuid": "^3.3.2", | ||
"webpack": "^4.15.1", | ||
"webpack-cli": "^3.0.8", | ||
@@ -48,0 +50,0 @@ "webpack-dev-server": "^3.1.4", |
# Nano ID | ||
<img src="img/logo.svg" alt="Nano ID logo by Anton Lovchikov" | ||
width="180" height="94" align="right"> | ||
A tiny, secure, URL-friendly, unique string ID generator for JavaScript. | ||
@@ -13,3 +16,3 @@ | ||
**Small.** Only 162 bytes (minified and gzipped). No dependencies. | ||
**Small.** Only 146 bytes (minified and gzipped). No dependencies. | ||
It uses [Size Limit] to control size. | ||
@@ -52,3 +55,4 @@ | ||
<img src="distribution.png" alt="Nano ID uniformity" width="340" height="135"> | ||
<img src="img/distribution.png" alt="Nano ID uniformity" | ||
width="340" height="135"> | ||
@@ -72,4 +76,4 @@ [Secure random values (in Node.js)]: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfba | ||
are packed in just 21 symbols instead of 36. | ||
2. Nano ID code is less than half the size of the `uuid/v4` package: | ||
162 bytes instead of 435. | ||
2. Nano ID code is 3 times less than `uuid/v4` package: | ||
146 bytes instead of 435. | ||
@@ -81,6 +85,6 @@ | ||
$ ./benchmark | ||
nanoid 375,840 ops/sec | ||
nanoid/generate 268,747 ops/sec | ||
uuid/v4 374,767 ops/sec | ||
shortid 41,260 ops/sec | ||
nanoid 332,991 ops/sec | ||
nanoid/generate 326,636 ops/sec | ||
uuid/v4 315,344 ops/sec | ||
shortid 31,559 ops/sec | ||
``` | ||
@@ -133,3 +137,6 @@ | ||
You can find popular alphabets in [`nanoid-dictionary`]. | ||
[ID collision probability]: https://alex7kom.github.io/nano-nanoid-cc/ | ||
[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary | ||
@@ -166,5 +173,15 @@ | ||
## Tools | ||
* [Website to choice ID size] and keep ID collision probability low. | ||
* [`nanoid-dictionary`] with popular alphabets to use with `nanoid/generate`. | ||
* [`nanoid-cli`] to generate ID from CLI. | ||
[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary | ||
## Other Programming Languages | ||
* [C#](https://github.com/codeyu/nanoid-net) | ||
* [Clojure and ClojureScript](https://github.com/zelark/nano-id) | ||
* [Crystal](https://github.com/mamantoha/nanoid.cr) | ||
@@ -180,5 +197,6 @@ * [Dart](https://github.com/pd4d10/nanoid) | ||
* [Rust](https://github.com/nikolay-govorov/nanoid) | ||
* [Swift](https://github.com/antiflasher/NanoID) | ||
Also, [CLI tool] is available to generate IDs from command line. | ||
[CLI version]: https://github.com/twhitbeck/nanoid-cli | ||
[CLI tool]: https://github.com/twhitbeck/nanoid-cli |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12831
11
140
196
29