0.1.5 • Published 6 years ago

iterable-mapreplace v0.1.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

iterable-mapreplace

NOTE: iterable-mapreplace was renamed to @extra-iterable/map-replace. NPM

Replace values in iterable with a map.

const mapReplace = require('iterable-mapreplace');
// mapReplace(<iterable>, <map>, [begin=0], [end], [target=[]], [at])

mapReplace(new Set(['shiwalik', 'range']), new Map([['range', 'mountains']]));
// ['shiwalik', 'mountains']
mapReplace([0, 1, 2, 3], new Map([[1, -1], [2, -2]]), 1);
// [-1, -2, 3]
mapReplace([0, 1, 2, 3], new Map([[1, -1], [2, -2]]), 1, 3);
// [-1, -2]
mapReplace([0, 1, 2, 3], new Map([[1, -1], [2, -2]]), 1, 3, [10, 11]);
// [10, 11, -1, -2]
mapReplace([0, 1, 2, 3], new Map([[1, -1], [2, -2]]), 1, 3, [10, 11], 1);
// [10, -1, -2]
0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago