Skip to content

Commit ff0955f

Browse files
committed
Update readme
Add more details about function invokation
1 parent bd0a493 commit ff0955f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const chooser = randomArrayElement();
3737

3838
```js
3939
const chooser = randomArrayElement(['Foo', 'Bar', 'FU', 'FooBar']);
40+
// Initiating the selector once and then we can use the returned function to select random none repeatable elements from the array.
4041

4142
chooser();
4243
// Result: Foo
@@ -52,7 +53,7 @@ chooser();
5253

5354
chooser();
5455
// Result: Foo
55-
// Only repeats, once all items within the array are exhausted.
56+
// It will only repeats, once all items within the array are exhausted.
5657
```
5758

5859
## Demo

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smakss/random-array-element",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"description": "Selects a random unique array element without repetition from provided array.",
55
"type": "module",
66
"main": "./index.cjs",

0 commit comments

Comments
 (0)