Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madnight/array-interpolatejs
Interpolate an array of numbers in js
https://github.com/madnight/array-interpolatejs
array array-manipulations es6 es7 functional-programming interpolation javascript library math npm
Last synced: about 2 months ago
JSON representation
Interpolate an array of numbers in js
- Host: GitHub
- URL: https://github.com/madnight/array-interpolatejs
- Owner: madnight
- License: mit
- Created: 2017-12-20T22:35:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-04T19:14:28.000Z (over 6 years ago)
- Last Synced: 2024-11-14T03:52:59.098Z (2 months ago)
- Topics: array, array-manipulations, es6, es7, functional-programming, interpolation, javascript, library, math, npm
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# array-interpolatejs
Interpolate an array of numbers in js## Requirements
* node 8.0 or higher
* npm or yarn## Installation
`npm install array-interpolatejs`
## Usage
```javascript
const { interpolateArray } = require('array-interpolatejs')interpolateArray(3)([1, 2, 3])
//[1, 2, 3]interpolateArray(5)([1, 2, 3])
//[1, 1.5, 2, 2.5, 3]iterpolateArray(4)([5, 9, 500, 30, 80, 5, 9])
//[5, 500, 80, 9]interpolateArray(9)([9])
//[9, 9, 9, 9, 9, 9, 9, 9, 9]
```