Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

infinitejest-names

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infinitejest-names - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

.travis.yml

18

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc