Skip to content

Commit 6d6137d

Browse files
committed
chore: add CodeSandbox to the readme
1 parent cc00d62 commit 6d6137d

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

Readme.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ yarn add @smakss/random-array-element
1717
to include it with common js module you should do this:
1818

1919
```js
20-
var randomArrayElement = require('@smakss/random-array-element');
20+
var randomArrayElement = require("@smakss/random-array-element");
2121
```
2222

2323
and to include it with ECMAscript module you can simply do this one:
2424

2525
```js
26-
import randomArrayElement from '@smakss/random-array-element';
26+
import randomArrayElement from "@smakss/random-array-element";
2727
```
2828

2929
then to use it within your application you can do it just like this:
@@ -36,7 +36,7 @@ const chooser = randomArrayElement();
3636
```
3737

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

4242
chooser();
@@ -59,3 +59,7 @@ chooser();
5959
## Demo
6060

6161
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.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
{
2-
"name": "@smakss/random-array-element",
3-
"version": "1.2.3",
2+
"author": "SMAKSS",
3+
"bugs": {
4+
"url": "https://github.com/SMAKSS/random-array-element/issues"
5+
},
46
"description": "Selects a random unique array element without repetition from provided array.",
5-
"type": "module",
6-
"main": "./index.cjs",
77
"exports": {
88
"import": "./index.mjs",
99
"require": "./index.cjs"
1010
},
11-
"repository": {
12-
"type": "git",
13-
"url": "git+https://github.com/SMAKSS/random-array-element.git"
14-
},
11+
"homepage": "https://github.com/SMAKSS/random-array-element#readme",
1512
"keywords": [
1613
"npm",
1714
"yarn",
@@ -25,10 +22,13 @@
2522
"random-element-without-repeat",
2623
"random-array-element-without-repetition"
2724
],
28-
"author": "SMAKSS",
2925
"license": "MIT",
30-
"bugs": {
31-
"url": "https://github.com/SMAKSS/random-array-element/issues"
26+
"main": "./index.cjs",
27+
"name": "@smakss/random-array-element",
28+
"repository": {
29+
"type": "git",
30+
"url": "git+https://github.com/SMAKSS/random-array-element.git"
3231
},
33-
"homepage": "https://github.com/SMAKSS/random-array-element#readme"
32+
"type": "module",
33+
"version": "1.2.4"
3434
}

0 commit comments

Comments
 (0)