nanoid 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 2.1.1
5
+ * Fix React Native support (by Shawn Hwei).
6
+
4
7
  ## 2.1
5
8
  * Improve React Native support (by Sebastian Werner).
6
9
 
package/README.md CHANGED
@@ -32,8 +32,8 @@ Supports [all browsers], Node.js and React Native.
32
32
 
33
33
  1. [Comparison with UUID](#comparison-with-uuid)
34
34
  2. [Benchmark](#benchmark)
35
- 3. [Security](#security)
36
35
  4. [Tools](#tools)
36
+ 3. [Security](#security)
37
37
  6. Usage
38
38
  1. [JS](#js)
39
39
  2. [React](#react)
@@ -89,6 +89,19 @@ rndm 2,413,565 ops/sec
89
89
  ```
90
90
 
91
91
 
92
+ ## Tools
93
+
94
+ * [ID size calculator] to choice smaller ID size depends on your case.
95
+ * [`nanoid-dictionary`] with popular alphabets to use with `nanoid/generate`.
96
+ * [`nanoid-cli`] to generate ID from CLI.
97
+ * [`nanoid-good`] to be sure that your ID doesn't contain any obscene words.
98
+
99
+ [`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary
100
+ [ID size calculator]: https://zelark.github.io/nano-id-cc/
101
+ [`nanoid-cli`]: https://github.com/twhitbeck/nanoid-cli
102
+ [`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good
103
+
104
+
92
105
  ## Security
93
106
 
94
107
  *See a good article about random generators theory:
@@ -118,17 +131,11 @@ Nano ID uses a [better algorithm] and is tested for uniformity.
118
131
  [better algorithm]: https://github.com/ai/nanoid/blob/master/format.js
119
132
 
120
133
 
121
- ## Tools
134
+ ### Vulnerabilities
122
135
 
123
- * [ID size calculator] to choice smaller ID size depends on your case.
124
- * [`nanoid-dictionary`] with popular alphabets to use with `nanoid/generate`.
125
- * [`nanoid-cli`] to generate ID from CLI.
126
- * [`nanoid-good`] to be sure that your ID doesn't contain any obscene words.
127
-
128
- [`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary
129
- [ID size calculator]: https://zelark.github.io/nano-id-cc/
130
- [`nanoid-cli`]: https://github.com/twhitbeck/nanoid-cli
131
- [`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good
136
+ To report a security vulnerability, please use the
137
+ [Tidelift security contact](https://tidelift.com/security).
138
+ Tidelift will coordinate the fix and disclosure.
132
139
 
133
140
 
134
141
  ## Usage
@@ -251,7 +258,7 @@ ID generators on client and server side.
251
258
  * [C#](https://github.com/codeyu/nanoid-net)
252
259
  * [Clojure and ClojureScript](https://github.com/zelark/nano-id)
253
260
  * [Crystal](https://github.com/mamantoha/nanoid.cr)
254
- * [Dart](https://github.com/pd4d10/nanoid)
261
+ * [Dart](https://github.com/pd4d10/nanoid-dart)
255
262
  * [Go](https://github.com/matoous/go-nanoid)
256
263
  * [Elixir](https://github.com/railsmechanic/nanoid)
257
264
  * [Haskell](https://github.com/4e6/nanoid-hs)
@@ -370,10 +377,3 @@ async function createUser () {
370
377
  user.id = await format(random, url, 10)
371
378
  }
372
379
  ```
373
-
374
-
375
- ## Security
376
-
377
- To report a security vulnerability, please use the
378
- [Tidelift security contact](https://tidelift.com/security).
379
- Tidelift will coordinate the fix and disclosure.
@@ -10,5 +10,5 @@ try {
10
10
  }
11
11
 
12
12
  module.exports = function (bytes) {
13
- return random.getRandomBytesAsync(new Uint8Array(bytes))
13
+ return random.getRandomBytesAsync(bytes)
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanoid",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "A tiny (141 bytes), secure URL-friendly unique string ID generator",
5
5
  "keywords": [
6
6
  "uuid",
@@ -18,13 +18,13 @@
18
18
  "./async/random.js": "./async/random.browser.js"
19
19
  },
20
20
  "react-native": {
21
- "./async/random.js": "./random.rn.js"
21
+ "./async/random.js": "./async/random.rn.js"
22
22
  },
23
23
  "sideEffects": false,
24
24
  "eslintIgnore": [
25
25
  "test/demo/build"
26
26
  ],
27
27
  "sharec": {
28
- "version": "0.4.2"
28
+ "version": "0.4.4"
29
29
  }
30
30
  }