{"name":"ml-array-rescale","version":"1.0.0","description":"Rescale an array into a range","main":"lib/index.js","module":"src/index.js","files":["lib","src"],"repository":{"type":"git","url":"git+https://github.com/mljs/array.git"},"keywords":[],"author":{"name":"Michaël Zasso"},"license":"MIT","bugs":{"url":"https://github.com/mljs/array/issues"},"homepage":"https://github.com/mljs/array/tree/master/packages/array-rescale#readme","dependencies":{"ml-array-max":"^1.0.0","ml-array-min":"^1.0.0"},"_id":"ml-array-rescale@1.0.0","scripts":{},"_shasum":"ae2d2a2c9ab72686dfbf8a212b7b891ef491481d","_from":".","_npmVersion":"4.5.0","_nodeVersion":"7.9.0","_npmUser":{"name":"targos","email":"targos@live.com"},"maintainers":[{"name":"targos","email":"targos@live.com"}],"dist":{"shasum":"ae2d2a2c9ab72686dfbf8a212b7b891ef491481d","tarball":"http://registry-npm.ywwl.com/ml-array-rescale/download/ml-array-rescale-1.0.0.tgz","integrity":"sha512-3ReYo8P5tBtiHksSGaFKvwS87IKNr5KxWKaGMoGwTbrOTR7fs16EHZeKCjzKL0gLdPk1gv6tzKXBqyvwcsliew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID43dVNb19iQuF1MEO0Vw1ZqqONhvrnu74pJ1f2PxUxNAiEA3ybNTa0ftT4VVxFoiFxrnjMgxbBxqq8ypr64KOg/QPQ="}],"size":2383,"noattachment":false,"key":"/ml-array-rescale/-/ml-array-rescale-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ml-array-rescale-1.0.0.tgz_1495556361562_0.04363160394132137"},"directories":{},"readme":"# array-rescale\n\n  [![NPM version][npm-image]][npm-url]\n  [![npm download][download-image]][download-url]\n\nRescale an array into a range.\n\n## Installation\n\n`$ npm install --save ml-array-rescale`\n\n## Usage\n\n### `rescale(input[, options])`\n\nRescales the values in the `input` so they fit between two new values.\n\n__Options:__\n\n* `min`: the new minimum value (default: 0)\n* `max`: the new maximum value (default: 1)\n* `output`: an array to use for output. You can pass `input` here to get an in-place modification.\n\n```js\nimport rescale from 'ml-array-rescale';\n\nconst result = rescale([0, 1, 2, 3, 4]);\n// [0, 0.25, 0.5, 0.75, 1]\n```\n\n## License\n\n  [MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/ml-array-rescale.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/ml-array-rescale\n[download-image]: https://img.shields.io/npm/dm/ml-array-rescale.svg?style=flat-square\n[download-url]: https://npmjs.org/package/ml-array-rescale\n","publish_time":1495556362434,"_cnpm_publish_time":1495556362434,"dist-tags":{"latest":"2.0.0"}}