101 icon indicating copy to clipboard operation
101 copied to clipboard

replace

Open tjmehta opened this issue 8 years ago • 1 comments

// values
['a','a','a'].map(replace('a', 'b')) // ['b','b','b']
// functions
['a','a','a'].map(replace(equals('a'), returnVal('b'))) // ['b','b','b']

tjmehta avatar Jun 05 '16 01:06 tjmehta

Signature could match other array methods find and findIndex..

// values
replace(['a','a','a'], 'a', 'b') // ['b','b','b']
// functions
replace(['a','a','a'], equals('a'), returnVal('b')) // ['b','b','b']

tjmehta avatar Jun 05 '16 01:06 tjmehta