find-and-replace-array

1.0.1 • Public • Published

Build Status npm find-and-replace-array

Small plain JavaScript function for finding an object in an array and returning a copy of the array with the matching items replaced.

Used in React components for updating individual items in immutable arrays

Function Signature

findAndReplace(Array array, Object object, Function/string matcher);

Examples

See the test.js file for example usages

Package Sidebar

Install

npm i find-and-replace-array

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • moodysalem