puppyid 1.0.0 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppyid",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Lightweight utility for generating unique process and random IDs in Node.js",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -16,7 +16,8 @@
16
16
  "random",
17
17
  "nodejs",
18
18
  "utility",
19
- "puppyid"
19
+ "puppyid",
20
+ "onlypuppy7"
20
21
  ],
21
22
  "scripts": {
22
23
  "test": "node src/tests/test.js"
@@ -24,7 +25,7 @@
24
25
  "author": "onlypuppy7",
25
26
  "license": "MIT",
26
27
  "dependencies": {
27
- "node-fetch": "^3.3.2",
28
- "puppyscrambled": "^1.0.1"
28
+ "nanoid": "^5.1.6",
29
+ "puppyscrambled": "^1.0.2"
29
30
  }
30
31
  }
package/src/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export declare const createId: () => string;
2
+ export declare const id: string;
3
+
4
+ export default id;
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import scrambled from 'puppyscrambled';
2
2
 
3
- export const createId = () => scrambled.getRandomChar() + scrambled.getRandomChar() + scrambled.getRandomChar();
3
+ export const createId = (len = 3) => scrambled.getScrambled(len, len);
4
4
 
5
5
  export const id = createId();
6
6