{"name":"ml-array-rescale","version":"2.0.0","description":"Rescale an array into a range","type":"module","exports":{".":{"ml-array-internal":"./src/index.ts","default":"./lib/index.js"}},"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":"^3.0.0","ml-array-max":"^2.0.0","ml-array-min":"^2.0.0"},"gitHead":"17f10d119716a8d6f4c8bb828d9fe0da8bf1c036","_id":"ml-array-rescale@2.0.0","_nodeVersion":"20.20.2","_npmVersion":"lerna/9.0.7/node@v20.20.2+x64 (linux)","dist":{"integrity":"sha512-2GGtKfSno94/kIloWGvpp/U5Q5vLvLrza+SAaGsLeo6Xj4mEbA6Gqx+oTfZFkxnd1grT2X007HfJNs3T5BsiVg==","shasum":"6fcaa3010863a7eac339bb6072618ba7fa17eefe","tarball":"http://registry-npm.ywwl.com/ml-array-rescale/download/ml-array-rescale-2.0.0.tgz","fileCount":9,"unpackedSize":11524,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDXf/Yr2/aTDrtftEQZVKTL+9WRt3CPpPM2w4bsDeNaCQIhANUa7kvymZzINu6imttARLUUnIYbgpJ+JzMcOph093+T"}],"size":3766,"noattachment":false,"key":"/ml-array-rescale/-/ml-array-rescale-2.0.0.tgz"},"_npmUser":{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},"directories":{},"maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"npm@secmail.targos.dev"},{"name":"lpatiny","email":"luc@patiny.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ml-array-rescale_2.0.0_1776158666831_0.3080503675359725"},"_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":1776158666953,"_cnpm_publish_time":1776158666953,"dist-tags":{"latest":"2.0.0"}}