spider-man-names
list of some spider-man characters names
the problem
make your unit tests more interesting with cool names of spider-man comic characters instead of well-known guy 'John Doe'
this solution
this module exposes an API for you to get a random character name every time you call it
installation
this module is distributed via NPM which is bundled with Node.js and should be installed as one of your project's dependencies:
npm install spider-man-names
or
yarn add spider-man-names
alternatively you can get the UMD build which is also published to the npm registry and is therefore available via https://unpkg.com:
- https://unpkg.com/spider-man-names@latest/dist/index.umd.js
- https://unpkg.com/spider-man-names@latest/dist/index.umd.min.js
the UMD build exposes the module as a global called spiderManNames
or as an unnamed module for AMD/CommonJS (require it by its file path)
usage
const spiderManNames = require('spider-man-names') // CommonJS
console.log(spiderManNames.random()) // Lizard
API
Method | Result type | Result description |
---|---|---|
all | array | all character's names |
random() | string | random character's name |
example
JS Bin playground
thanks
thanks to @kentcdodds for his awesome workshop
license
MIT © ohhhh.me