Package Exports
- remove-value-js
- remove-value-js/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remove-value-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
remove-value-js
Remove one or more elements from an array by value
Installation
// npm
$ npm install remove-value-jsUsage
var removeValue = require('remove-value-js');
// as a function
removeValue([ 'apple', 'lemon', 'banana', 'lemon' ], 'lemon'); // [ 'apple', 'banana' ]
removeValue([ 'apple', 'lemon', 'banana', 'lemon' ], 'lemon', 1); // [ 'apple', 'banana', 'lemon' ]
// as a method
Array.prototype.remove = removeValue;
var list = [ 'apple', 'lemon', 'banana' ];
list.remove('banana');
list; // [ 'apple', 'lemon' ]
Alters the array "by reference" and returns the array.License
MIT