Skip to content

Commit c4765c3

Browse files
committed
chore: change the position of demo in readme
1 parent 59ceba0 commit c4765c3

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
In order to select an element within an array, you can simply use `Math.random()` but what about when you don't want to select an element that selected before. Here this package will come to use. This package works with simple closure, so you can simply invoke randomArrayElement once everywhere in your project then use it to generate random elements from your array no matter your array is flat or nested, it will choose a random unique element from your array until all the array element get exhausted.
66

7+
## Demo
8+
9+
You can check the [working demo](https://runkit.com/smakss/random-array-element) in runkit.
10+
11+
or
12+
13+
[![View @smakss/random-array-element](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/smakss-random-array-element-7yizos?fontsize=14&hidenavigation=1&theme=dark)
14+
715
## How it works?
816

917
To install it you can simply do the following command:
@@ -55,11 +63,3 @@ chooser();
5563
// Result: Foo
5664
// It will only repeats, once all items within the array are exhausted.
5765
```
58-
59-
## Demo
60-
61-
You can check the [working demo](https://runkit.com/smakss/random-array-element) in runkit.
62-
63-
or
64-
65-
[![View @smakss/random-array-element](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/smakss-random-array-element-7yizos?fontsize=14&hidenavigation=1&theme=dark)

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
"url": "git+https://github.com/SMAKSS/random-array-element.git"
3131
},
3232
"type": "module",
33-
"version": "1.2.4"
33+
"version": "1.2.5"
3434
}

0 commit comments

Comments
 (0)