{"_id":"random-floating","_rev":"5-809ea9f84c4a6e29f19db49843d871e6","name":"random-floating","description":"Return a random floating point number.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"random-floating","version":"0.0.0","description":"Generate a random float number.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-floating.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mock-end/random-floating/issues"},"homepage":"https://github.com/mock-end/random-floating#readme","gitHead":"ebad606657da54be09bbf88e85d132aeabcb9819","_id":"random-floating@0.0.0","_shasum":"e5eab5e8f6cf46260da6e110633bc7a157118b89","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"e5eab5e8f6cf46260da6e110633bc7a157118b89","tarball":"https://registry.npmjs.org/random-floating/-/random-floating-0.0.0.tgz","integrity":"sha512-lZBi/822wZRT+cnPUBlyINie40N+1BlrjwT0osrIuzDuOMLiJyXfuU29QdM9U4lS8oiLesVS8iH7o3J+vBMrvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnifqt/FA6sF3+nCvow8hwMD4NTt41nl2Q/b0wDrDPmQIgWaTWeDMLFA3uSoa3M6ThFzW7I8E7aXdb/yk0G2EpUnc="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-floating-0.0.0.tgz_1461261066795_0.4554448558483273"}},"1.0.0":{"name":"random-floating","version":"1.0.0","description":"Return a random floating point number.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["decimal","float","double","num","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-floating.git"},"bugs":{"url":"https://github.com/mock-end/random-floating/issues"},"homepage":"https://github.com/mock-end/random-floating#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"clamp":"^1.0.1","max-safe-int":"^1.0.0","object-assign":"^4.0.1","to-integer":"^1.0.1","tofixed":"^1.0.0"},"gitHead":"6dd3f90c2ef5bbef81675ba5763b186da2783eae","_id":"random-floating@1.0.0","_shasum":"8d0cad739df7b8272b54d0f825550d845976c5f5","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"8d0cad739df7b8272b54d0f825550d845976c5f5","tarball":"https://registry.npmjs.org/random-floating/-/random-floating-1.0.0.tgz","integrity":"sha512-cWT4Y9DgPOzol9gcJ700r0qw/aPhfPhc6A5RVqWymZd32JgOsyFl51i16aYonG9CPU93Ln9C2pMStgRM5n6uoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5Clnwn2aJxnzCpjADWlrenVYfQx1Zmtkl9PZlGYiFfAiANl0NSw7HOBBQ5g1/8Taw3KKmPS2ganGzyP5URE8u44w=="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-floating-1.0.0.tgz_1461437256537_0.7412597513757646"}},"1.0.1":{"name":"random-floating","version":"1.0.1","description":"Return a random floating point number.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["decimal","float","double","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-floating.git"},"bugs":{"url":"https://github.com/mock-end/random-floating/issues"},"homepage":"https://github.com/mock-end/random-floating#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"clamp":"^1.0.1","max-safe-int":"^1.0.0","random-integral":"^1.0.3","to-integer":"^1.0.1","tofixed":"^1.0.0"},"gitHead":"92dce3b66fbd9943532799004c35cd729683355d","_id":"random-floating@1.0.1","_shasum":"f5690550a83905031b55b6828935c33de85af706","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"f5690550a83905031b55b6828935c33de85af706","tarball":"https://registry.npmjs.org/random-floating/-/random-floating-1.0.1.tgz","integrity":"sha512-FB7jNFjfQdYtCH0EFLzrY4hLn+XuRXy15MuNt2nBIqFUjKTu/y253r43PeEFRdnGlQsteNRmDk3dTuhDvimG0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGoME0+ZVijF++uNqA3qLZUqQZ8lvBKjpiO4+D+9WtaAiBYYTinw6/yINE6VE9FIYkeryq9rcYkpbAYhKgVQgHL2g=="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-floating-1.0.1.tgz_1461560923058_0.12191758444532752"}}},"readme":"# random-floating\n\n> Return a random floating point number.\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/mock-end/random-floating/blob/master/LICENSE)\n\n[![build:?](https://img.shields.io/travis/mock-end/random-floating/master.svg?style=flat-square)](https://travis-ci.org/mock-end/random-floating)\n[![coverage:?](https://img.shields.io/coveralls/mock-end/random-floating/master.svg?style=flat-square)](https://coveralls.io/github/mock-end/random-floating)\n\n\n## Install\n\n```\n$ npm install --save random-floating\n```\n\n## Usage\n\n> For more use-cases see the [tests](https://github.com/mock-end/random-floating/blob/master/test/spec/index.js)\n\n```js\nvar randomFloat = require('random-floating');\n\n// API\n// - randomFloat([options])\n\n// options\n// - min\n// - max\n// - fixed\n```\n\nBy default it will return a fixed number of at most 4 digits after the decimal.\n\n```js\nrandomFloat();\n// range: -9007199254740992 to 9007199254740992\n// => -211920142886.5024\n```\n\n**Note**: *at most* 4 digits. This because, unless we returned trailing zeroes (which aren’t allowed on the JavaScript float) we can’t guarantee 4 digits after the decimal. So if random chance comes back with `82383854.2000` then `82383854.2` is what will be returned.\n\nCan optionally provide min and max:\n\n```js\nrandomFloat({max: 5});\n// => -239837235632.3785\n\nrandomFloat({min:10, max: 100});\n// => 66.7269\n```\n\n**Note**: these `min` and `max` are **inclusive**, so they are included in the range.\n\nTo retrieve a set number of fixed digits after the decimal, provide it as an option:\n\n```js\nrandomFloat({fixed: 7});\n// => -749512327.7447168\n```\n\nOr combine them:\n\n```js\nrandomFloat({min: 0, max: 100, fixed: 8});\n// => 45.92367599\n```\n\n## Related\n\n- [random-integral](https://github.com/mock-end/random-integral) - Return a random integer.\n- [random-natural](https://github.com/mock-end/random-natural) - Return a random natural number.\n- [random-decimal](https://github.com/mock-end/random-decimal) - Return a random decimal.\n- [random-index](https://github.com/mock-end/random-index) - Return a random array-like index.\n- [random-binary](https://github.com/mock-end/random-binary) - Return a random binary number.\n- [random-octal](https://github.com/mock-end/random-octal) - Return a random octal number.\n- [random-hexadecimal](https://github.com/mock-end/random-hexadecimal) - Return a random hexadecimal number.\n- [random-unicode](https://github.com/mock-end/random-unicode) - Return a random unicode. \n- [random-bool](https://github.com/mock-end/random-bool) - Return a random boolean (true/false).\n- [random-char](https://github.com/mock-end/random-char) - Return a random char.\n\n\n## Contributing\n\nPull requests and stars are highly welcome.\n\nFor bugs and feature requests, please [create an issue](https://github.com/mock-end/random-floating/issues/new).\n","maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"time":{"modified":"2022-06-25T11:24:57.935Z","created":"2016-04-21T17:51:07.229Z","0.0.0":"2016-04-21T17:51:07.229Z","1.0.0":"2016-04-23T18:47:39.646Z","1.0.1":"2016-04-25T05:08:46.463Z"},"homepage":"https://github.com/mock-end/random-floating#readme","repository":{"type":"git","url":"git+https://github.com/mock-end/random-floating.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"bugs":{"url":"https://github.com/mock-end/random-floating/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["decimal","float","double","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"]}