1.0.1 • Published 8 years ago

find-and-replace-array v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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