Comparing version 2.1.8 to 2.1.9
module.exports = function (random, alphabet, size) { | ||
var mask = (2 << 31 - Math.clz32((alphabet.length - 1) | 1)) - 1 | ||
var step = Math.ceil(1.6 * mask * size / alphabet.length) | ||
var step = -~(1.6 * mask * size / alphabet.length) | ||
@@ -5,0 +5,0 @@ function tick (id) { |
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 2.1.9 | ||
* Reduce `format` and `async/format` size (by Dair Aidarkhanov). | ||
## 2.1.8 | ||
@@ -5,0 +8,0 @@ * Improve React docs (by Nahum Zsilva). |
module.exports = function (random, alphabet, size) { | ||
var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1 | ||
var step = Math.ceil(1.6 * mask * size / alphabet.length) | ||
var step = -~(1.6 * mask * size / alphabet.length) | ||
var id = '' | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "nanoid", | ||
"version": "2.1.8", | ||
"version": "2.1.9", | ||
"description": "A tiny (137 bytes), secure URL-friendly unique string ID generator", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
26428