nanoid 5.1.1 → 5.1.2

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/index.d.ts CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * A tiny, secure, URL-friendly, unique string ID generator for JavaScript
3
+ * with hardware random generator.
4
+ *
5
+ * ```js
6
+ * import { nanoid } from 'nanoid'
7
+ * model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
8
+ * ```
9
+ *
10
+ * @module
11
+ */
12
+
1
13
  /**
2
14
  * Generate secure URL-friendly unique ID.
3
15
  *
@@ -1,3 +1,16 @@
1
+ /**
2
+ * By default, Nano ID uses hardware random bytes generation for security
3
+ * and low collision probability. If you are not so concerned with security,
4
+ * you can use it for environments without hardware random generators.
5
+ *
6
+ * ```js
7
+ * import { nanoid } from 'nanoid/non-secure'
8
+ * const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"
9
+ * ```
10
+ *
11
+ * @module
12
+ */
13
+
1
14
  /**
2
15
  * Generate URL-friendly unique ID. This method uses the non-secure
3
16
  * predictable random generator with bigger collision probability.
@@ -1,16 +1,4 @@
1
1
  /* @ts-self-types="./index.d.ts" */
2
- /**
3
- * By default, Nano ID uses hardware random bytes generation for security
4
- * and low collision probability. If you are not so concerned with security,
5
- * you can use it for environments without hardware random generators.
6
- *
7
- * ```js
8
- * import { nanoid } from 'nanoid/non-secure'
9
- * const id = nanoid()
10
- * ```
11
- *
12
- * @module
13
- */
14
2
  let urlAlphabet =
15
3
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
16
4
  export let customAlphabet = (alphabet, defaultSize = 21) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanoid",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "A tiny (118 bytes), secure URL-friendly unique string ID generator",
5
5
  "keywords": [
6
6
  "uuid",