Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wankdanker/node-mutable-array
Mutable Array Functions
https://github.com/wankdanker/node-mutable-array
Last synced: 14 days ago
JSON representation
Mutable Array Functions
- Host: GitHub
- URL: https://github.com/wankdanker/node-mutable-array
- Owner: wankdanker
- Created: 2015-11-19T16:32:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-19T16:44:59.000Z (about 9 years ago)
- Last Synced: 2024-12-06T04:39:26.306Z (about 1 month ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mutable-array
-------------Functions to modify an array in-place instead of making a copy.
example
-------```js
var mmap = require('mutable-array').mmap;
var a = [1,2,3,4,5];mmap(a, function (val) {
return val + 1;
});console.log(a);
//[2,3,4,5,6];
```api
---### mmap([array,] callback, thisArg)
Standard Array.map functionality, but values that are returned from callback
replace the original element in the array.### mfilter([array,] callback, thisArg)
Standard Array.filter functionality, but removes (using splice) values from
the array if value returned from callback does not equal true.### applyPrototype()
Add all functions to the Array prototype.
license
-------MIT