Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

superheroes

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superheroes - npm Package Compare versions

Comparing version
1.0.0
to
2.0.0
+2
-2
index.js
'use strict';
var uniqueRandomArray = require('unique-random-array');
var superheroes = require('./superheroes.json');
const uniqueRandomArray = require('unique-random-array');
const superheroes = require('./superheroes.json');
exports.all = superheroes;
exports.random = uniqueRandomArray(superheroes);
{
"name": "superheroes",
"version": "1.0.0",
"description": "Get superhero names",
"license": "MIT",
"repository": "sindresorhus/superheroes",
"bin": "cli.js",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "node test.js"
},
"files": [
"index.js",
"cli.js",
"superheroes.json"
],
"keywords": [
"cli-app",
"cli",
"bin",
"word",
"words",
"list",
"array",
"random",
"rand",
"superheroes",
"superhero",
"heroes",
"hero",
"marvel",
"dc",
"comics"
],
"dependencies": {
"meow": "^3.0.0",
"unique-random-array": "^1.0.0"
},
"devDependencies": {
"ava": "0.0.4"
}
"name": "superheroes",
"version": "2.0.0",
"description": "Get superhero names",
"license": "MIT",
"repository": "sindresorhus/superheroes",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js",
"superheroes.json"
],
"keywords": [
"word",
"words",
"list",
"array",
"random",
"superheroes",
"superhero",
"heroes",
"hero",
"marvel",
"dc",
"comics"
],
"dependencies": {
"unique-random-array": "^1.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
}
+10
-30

@@ -5,5 +5,5 @@ # superheroes [![Build Status](https://travis-ci.org/sindresorhus/superheroes.svg?branch=master)](https://travis-ci.org/sindresorhus/superheroes)

![](https://cloud.githubusercontent.com/assets/170270/7563453/ad57a684-f7dd-11e4-8302-081f132e8653.png)
<img src="https://cloud.githubusercontent.com/assets/170270/7563453/ad57a684-f7dd-11e4-8302-081f132e8653.png" width="100" height="112" align="right">
The list is just a [JSON file](superheroes.json) and can be used wherever.
The list is just a [JSON file](superheroes.json) and can be used anywhere.

@@ -14,3 +14,3 @@

```
$ npm install --save superheroes
$ npm install superheroes
```

@@ -22,3 +22,3 @@

```js
var superheroes = require('superheroes');
const superheroes = require('superheroes');

@@ -34,3 +34,3 @@ superheroes.random();

Type: `array`
Type: `Array`

@@ -41,3 +41,3 @@ Superhero names in alphabetical order.

Type: `function`
Type: `Function`

@@ -47,31 +47,11 @@ Random superhero name.

## CLI
```
$ npm install --global superheroes
```
```
$ superheroes --help
Examples
$ superheroes
Spider-Ham
$ superheroes --all
3-D Man
A-Bomb
...
Options
--all Get all names instead of a random name
```
## Related
- [superheroes-cli](https://github.com/sindresorhus/superheroes-cli) - CLI for this module
- [supervillains](https://github.com/sindresorhus/supervillains) - Get supervillain names
- [cat-names](https://github.com/sindresorhus/cat-names) - Get popular cat names
- [dog-names](https://github.com/sindresorhus/dog-names) - Get popular dog names
- [pokemon](https://github.com/sindresorhus/pokemon) - Get Pokémon names
- [superb](https://github.com/sindresorhus/superb) - Get superb like words
- [yes-no-words](https://github.com/sindresorhus/yes-no-words) - Get yes/no like words

@@ -81,2 +61,2 @@

MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var superheroes = require('./');
var cli = meow({
help: [
'Examples',
' $ superheroes',
' Spider-Ham',
'',
' $ superheroes --all',
' 3-D Man',
' A-Bomb',
' ...',
'',
'Options',
' --all Get all names instead of a random name'
].join('\n')
});
console.log(cli.flags.all ? superheroes.all.join('\n') : superheroes.random());

Sorry, the diff of this file is not supported yet