Skip to content

Commit d3eabd3

Browse files
committed
Package got updated!
1 parent 67cc0c3 commit d3eabd3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

index.cjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
'use strict'
1+
'use strict';
22
function randomItemWithNoRepetition(array) {
3-
if (!Array.isArray(array) || array.length === 0) return -1
4-
var copy = array.slice()
3+
if (!Array.isArray(array) || array.length === 0) return -1;
4+
var copy = array.slice();
55
return function () {
6-
copy.length < 1 && (copy = array.slice())
6+
copy.length < 1 && (copy = array.slice());
77
var index = Math.floor(Math.random() * copy.length),
8-
item = copy[index]
9-
return copy.splice(index, 1), item
8+
item = copy[index];
9+
return copy.splice(index, 1), item;
1010
}
1111
}
1212

13-
module.exports = randomItemWithNoRepetition
13+
module.exports = randomItemWithNoRepetition;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smakss/random-array-element",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "Selects a random array element without repetition.",
55
"type": "module",
66
"main": "./index.cjs",
@@ -13,13 +13,13 @@
1313
"url": "git+https://github.com/SMAKSS/random-array-element.git"
1414
},
1515
"keywords": [
16-
"ES5",
17-
"ES6",
1816
"npm",
1917
"yarn",
2018
"array",
2119
"SMAKSS",
2220
"random",
21+
"CommonJS",
22+
"EcmaScript",
2323
"random-index",
2424
"random-array-element",
2525
"random-element-without-repeat",

0 commit comments

Comments
 (0)