summaryrefslogtreecommitdiff
path: root/node_modules/nanoid/non-secure
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/nanoid/non-secure
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/nanoid/non-secure')
-rw-r--r--node_modules/nanoid/non-secure/index.cjs21
-rw-r--r--node_modules/nanoid/non-secure/index.d.ts33
-rw-r--r--node_modules/nanoid/non-secure/index.js21
-rw-r--r--node_modules/nanoid/non-secure/package.json6
4 files changed, 0 insertions, 81 deletions
diff --git a/node_modules/nanoid/non-secure/index.cjs b/node_modules/nanoid/non-secure/index.cjs
deleted file mode 100644
index 09d57cdc..00000000
--- a/node_modules/nanoid/non-secure/index.cjs
+++ /dev/null
@@ -1,21 +0,0 @@
-let urlAlphabet =
- 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
-let customAlphabet = (alphabet, defaultSize = 21) => {
- return (size = defaultSize) => {
- let id = ''
- let i = size
- while (i--) {
- id += alphabet[(Math.random() * alphabet.length) | 0]
- }
- return id
- }
-}
-let nanoid = (size = 21) => {
- let id = ''
- let i = size
- while (i--) {
- id += urlAlphabet[(Math.random() * 64) | 0]
- }
- return id
-}
-module.exports = { nanoid, customAlphabet }
diff --git a/node_modules/nanoid/non-secure/index.d.ts b/node_modules/nanoid/non-secure/index.d.ts
deleted file mode 100644
index 4965322d..00000000
--- a/node_modules/nanoid/non-secure/index.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Generate URL-friendly unique ID. This method uses the non-secure
- * predictable random generator with bigger collision probability.
- *
- * ```js
- * import { nanoid } from 'nanoid/non-secure'
- * model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
- * ```
- *
- * @param size Size of the ID. The default size is 21.
- * @returns A random string.
- */
-export function nanoid(size?: number): string
-
-/**
- * Generate a unique ID based on a custom alphabet.
- * This method uses the non-secure predictable random generator
- * with bigger collision probability.
- *
- * @param alphabet Alphabet used to generate the ID.
- * @param defaultSize Size of the ID. The default size is 21.
- * @returns A random string generator.
- *
- * ```js
- * import { customAlphabet } from 'nanoid/non-secure'
- * const nanoid = customAlphabet('0123456789абвгдеё', 5)
- * model.id = //=> "8ё56а"
- * ```
- */
-export function customAlphabet(
- alphabet: string,
- defaultSize?: number
-): (size?: number) => string
diff --git a/node_modules/nanoid/non-secure/index.js b/node_modules/nanoid/non-secure/index.js
deleted file mode 100644
index e7e19adf..00000000
--- a/node_modules/nanoid/non-secure/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-let urlAlphabet =
- 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
-let customAlphabet = (alphabet, defaultSize = 21) => {
- return (size = defaultSize) => {
- let id = ''
- let i = size
- while (i--) {
- id += alphabet[(Math.random() * alphabet.length) | 0]
- }
- return id
- }
-}
-let nanoid = (size = 21) => {
- let id = ''
- let i = size
- while (i--) {
- id += urlAlphabet[(Math.random() * 64) | 0]
- }
- return id
-}
-export { nanoid, customAlphabet }
diff --git a/node_modules/nanoid/non-secure/package.json b/node_modules/nanoid/non-secure/package.json
deleted file mode 100644
index 9930d6ad..00000000
--- a/node_modules/nanoid/non-secure/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "type": "module",
- "main": "index.cjs",
- "module": "index.js",
- "react-native": "index.js"
-} \ No newline at end of file