{"name":"ml-array-rescale","version":"1.3.4","description":"Rescale an array into a range","main":"lib/index.js","module":"lib-es6/index.js","types":"types.d.ts","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":{"is-any-array":"^0.1.0","ml-array-max":"^1.2.2","ml-array-min":"^1.2.1"},"gitHead":"047f2d11d174dad9b576649f676adfa2439fff15","_id":"ml-array-rescale@1.3.4","_nodeVersion":"15.11.0","_npmVersion":"lerna/3.22.1/node@v15.11.0+x64 (darwin)","dist":{"integrity":"sha512-CI4+Vk69/sdJyuADh2mtzFvh9rulNOPLYPQIrnQkeOZQrT+a4E5sToHQiW/elMjtG+ArGRnzAl6qPmgsLvoRxQ==","shasum":"62aa50cb2dc30aacb86e2701792bec05a125218a","tarball":"http://registry-npm.ywwl.com/ml-array-rescale/download/ml-array-rescale-1.3.4.tgz","fileCount":9,"unpackedSize":12575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP11WCRA9TVsSAnZWagAAf+cP/37y6Rz2pq4o+HR9R36e\nbUdDlCJ8739WWXJEDG15xkZdP2O2peYBSSAcES2CKedpIMBV8C9nFf5dTCH6\n6c8vTt1B6vl4vKfgoSgKPaTFowX8CCs1e1fG5Ux8Bhh+epGohpMshCKqfh//\nlrWDp7nY/s5svfCLH+DPG/owulNxod7MYyQjE6xWH3TBwWRibz5PbHK9TGIY\nkGrR/Yen/WE0OzwkVnySiXsXcQQhv/sWn7IKVZmIqFv35DQtbUOLUyWJ0ErT\nqdvtOzF1M3ivZLH/ilUuj89tY3KJx+4zrcBALOzAhjU3DA0R+Z1I+O7xGfkx\nrIik1CpT+dpqXnDvK7XJWeV/rl8Nnoz4rKufF9eC8zpec5anJQSENV/+f/mV\nuG7c55bxB6Rk9I0CxZmwfW6nAtmZbjusAZ+rt55gf+dVwj/VmwQVuLq6yA25\n2PaLuEo4HQUzPdjpAeQyZSfGVxEC0vy35ACVIQOoiWDlO9YMwv4qBQ7GgWrg\nAIVBw24lPMRf34mz8cggi/5XaCbUt2eh9QxLBmrgwLME/JExlJHs70DUWWG3\nuuy9/eizpb7v9UekwfTloE855A8zPlLAc0aDYQDyLWfu2EvwV4bK3thneyhv\nH3vuwhepM7HzJWTXSmyddGSwVA7G89FaNmiGHBopglabybx7ierU5Z0K4G27\nyCT3\r\n=rIsI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0qsTTc1EjsdrVocFuLQtN8SCzHxfZ5d8UwguEitoMmAiAj1iNHHUZR058T/K/Q47T4Y3thfljzzFeezLOdlqq/PQ=="}],"size":3776,"noattachment":false,"key":"/ml-array-rescale/-/ml-array-rescale-1.3.4.tgz"},"_npmUser":{"name":"targos","email":"targos+npm@protonmail.com"},"directories":{},"maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"targos+npm@protonmail.com"},{"name":"lpatiny","email":"lpatiny@gmail.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ml-array-rescale_1.3.4_1614765398495_0.03324589081984741"},"_hasShrinkwrap":false,"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":1614765398632,"_cnpm_publish_time":1614765398632,"dist-tags":{"latest":"2.0.0"}}