infinitejest-names
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "infinitejest-names", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "retrieve a random name from DFW's monolithic novel Infinite Jest", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha src/index.test.js -W", | ||
"commit": "git-cz", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
@@ -30,3 +32,13 @@ "repository": { | ||
"unique-random-array": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "3.3.0", | ||
"commitizen": "1.0.4", | ||
"cz-conventional-changelog": "1.1.0", | ||
"mocha": "2.3.3", | ||
"semantic-release": "^4.3.5" | ||
}, | ||
"czConfig": { | ||
"path": "node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
var infiniteJestNames = require('./infinitejest-names.json'); | ||
var uniqueRandomArray = require('unique-random-array'); | ||
var getRandomItem = uniqueRandomArray(infiniteJestNames); | ||
module.exports = { | ||
all: infiniteJestNames, | ||
random: uniqueRandomArray(infiniteJestNames) | ||
}; | ||
random: random | ||
}; | ||
function random(num) { | ||
if (num === undefined) { | ||
return getRandomItem(); | ||
} else { | ||
var randomItems = []; | ||
for (var i = 0; i < num; i++) { | ||
randomItems.push(getRandomItem()); | ||
} | ||
return randomItems; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
5494
7
167
0
5