human-ids 1.0.5 → 1.0.7
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 +8 -0
- package/README.md +21 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.0.7] - 2023-07-07
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Changed README.md to correctly display usage information
|
|
11
|
+
## [1.0.6] - 2023-07-07
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Changed README.md to correctly display usage information
|
|
7
15
|
## [1.0.5] - 2023-07-07
|
|
8
16
|
|
|
9
17
|
### Remove
|
package/README.md
CHANGED
|
@@ -6,6 +6,18 @@ A library to generate human-readable IDs.
|
|
|
6
6
|
|
|
7
7
|
Human IDs is a JavaScript library that allows you to generate human-readable IDs. The IDs consist of a combination of adjectives, colors, nouns, and numbers, creating unique and memorable identifiers.
|
|
8
8
|
|
|
9
|
+
Supports English and Spanish
|
|
10
|
+
## Output example
|
|
11
|
+
bubbly-beige-fire-38
|
|
12
|
+
breezy-teal-faith-870
|
|
13
|
+
silly-indigo-imagination-440
|
|
14
|
+
genuine-turquoise-light-718
|
|
15
|
+
bubbly-purple-pen-450
|
|
16
|
+
genuine-silver-magic-935
|
|
17
|
+
delightful-brown-planet-642
|
|
18
|
+
cozy-orange-boat-449
|
|
19
|
+
excelente-morado-creatividad-829
|
|
20
|
+
energetico-oliva-libertad-765
|
|
9
21
|
## Installation
|
|
10
22
|
|
|
11
23
|
To use Human IDs in your project, you can install it via npm:
|
|
@@ -15,27 +27,24 @@ npm install human-ids
|
|
|
15
27
|
```
|
|
16
28
|
|
|
17
29
|
```javascript
|
|
18
|
-
|
|
30
|
+
import humanId from 'human-ids'
|
|
19
31
|
|
|
20
|
-
// Initialize the settings object
|
|
32
|
+
// Initialize the settings object (these are the defaults)
|
|
21
33
|
const settings = {
|
|
22
|
-
lang: '
|
|
34
|
+
lang: 'en',
|
|
23
35
|
adjective: true,
|
|
36
|
+
color: true,
|
|
24
37
|
noun: true,
|
|
25
38
|
number: {
|
|
26
39
|
min: 0,
|
|
27
40
|
max: 999,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
41
|
+
sets: 1,
|
|
42
|
+
completeWithZeros: false,
|
|
43
|
+
},
|
|
31
44
|
};
|
|
32
45
|
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// Generate an ID using the class instance
|
|
37
|
-
const id = idGenerator.generateId();
|
|
38
|
-
console.log(id);
|
|
46
|
+
// Generate an ID using the function
|
|
47
|
+
console.log(humanId())
|
|
39
48
|
```
|
|
40
49
|
## Configuration
|
|
41
50
|
|