lerolero
Advanced tools
Comparing version 0.0.1 to 0.1.0
15
index.js
@@ -1,3 +0,1 @@ | ||
const shuffle = require('shuffle-array') | ||
const tab0 = [ | ||
@@ -132,8 +130,13 @@ 'Caros amigos, ', | ||
function randomItem(arr) { | ||
const index = Math.floor(Math.random() * (arr.length - 1)) | ||
return arr[index] | ||
} | ||
function lerolero() { | ||
return ( | ||
shuffle(tab0, {copy: true})[0] + | ||
shuffle(tab1, {copy: true})[0] + | ||
shuffle(tab2, {copy: true})[0] + | ||
shuffle(tab3, {copy: true})[0] | ||
randomItem(tab0) + | ||
randomItem(tab1) + | ||
randomItem(tab2) + | ||
randomItem(tab3) | ||
) | ||
@@ -140,0 +143,0 @@ } |
{ | ||
"name": "lerolero", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Gerador de lerolero", | ||
@@ -16,16 +16,14 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/thiamsantos/lerolero.git" | ||
"url": "git+https://github.com/gugutz/lerolero.git" | ||
}, | ||
"keywords": [], | ||
"author": "Thiago Santos", | ||
"author": "Gustavo P Borges", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/thiamsantos/lerolero/issues" | ||
"url": "https://github.com/gugutz/lerolero/issues" | ||
}, | ||
"homepage": "https://github.com/thiamsantos/lerolero#readme", | ||
"dependencies": { | ||
"shuffle-array": "^1.0.1" | ||
}, | ||
"homepage": "https://github.com/gugutz/lerolero#readme", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"prettier": "^1.4.4", | ||
"prettier": "^1.16.3", | ||
"xo": "^0.18.2" | ||
@@ -32,0 +30,0 @@ }, |
@@ -48,2 +48,2 @@ # lerolero | ||
## Licença | ||
[MIT license](LICENSE) © [Thiago Santos](https://thiamsantos.github.io/) | ||
[MIT license](LICENSE) © [Gustavo P Borges](https://gugutz.github.io/) |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
143
78965
6
1
- Removedshuffle-array@^1.0.1
- Removedshuffle-array@1.0.1(transitive)