nanoid 5.1.8 → 5.1.10

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.
Files changed (3) hide show
  1. package/index.js +1 -0
  2. package/package.json +1 -1
  3. package/SECURITY.md +0 -21
package/index.js CHANGED
@@ -4,6 +4,7 @@ export { urlAlphabet } from './url-alphabet/index.js'
4
4
  const POOL_SIZE_MULTIPLIER = 128
5
5
  let pool, poolOffset
6
6
  function fillPool(bytes) {
7
+ if (bytes < 0) bytes = 0
7
8
  if (!pool || pool.length < bytes) {
8
9
  pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
9
10
  crypto.getRandomValues(pool)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanoid",
3
- "version": "5.1.8",
3
+ "version": "5.1.10",
4
4
  "description": "A tiny (118 bytes), secure URL-friendly unique string ID generator",
5
5
  "keywords": [
6
6
  "id",
package/SECURITY.md DELETED
@@ -1,21 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- We supports only the latest version and `3.x` branch.
6
-
7
- | Version | Supported |
8
- | ------- | ------------------ |
9
- | 5.1.x | :white_check_mark: |
10
- | 5.0.x | :x: |
11
- | 4.0.x | :x: |
12
- | 3.3.x | :white_check_mark: |
13
- | 3.0.x | :x: |
14
- | < 3.0 | :x: |
15
-
16
- ## Reporting a Vulnerability
17
-
18
- To report a security vulnerability, please use the [Tidelift security contact].
19
- Tidelift will coordinate the fix and disclosure.
20
-
21
- [Tidelift security contact]: https://tidelift.com/security