seedgen
v1.0.0
Published
Easily generate seeded "random" values
Downloads
7
Maintainers
Readme
seedgen
Easily generate seeded "random" values
Example
var generate = seedgen({color: 6, rotation: 360})
generate("middlerob") // { color: 5, rotation: 71 }
generate("[email protected]") // { color: 2, rotation: 225 }
generate("middlerob") // { color: 5, rotation: 71 }
seedgen
returns a function that:
- Gives a
color
of 0 through 5 and arotation
of 0 through 359 - Always gives the same values for the same key/parameters
Try it out
Installation
Node/Browserify
npm install seedgen --save
Browser/RequireJS/CommonJS Standalone Package
Dev version seedgen-standalone.js
Minified seedgen-standalone.min.js
Development
npm install
to load dependencies.
Run tests
npm test
Run tests automatically when files change
npm run testwatch
Build standlone versions
npm run standalone