0.1.3 • Published 6 years ago

string-mapreplacesuffix v0.1.3

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

string-mapreplacesuffix

NOTE: string-mapreplacesuffix was renamed to @extra-string/map-replace-suffix. NPM

Replace suffix of string using map.

const mapReplaceSuffix = require('string-mapreplacesuffix');
// mapReplaceSuffix(<string>, <map>, [max suffix length])

mapReplaceSuffix('ender', new Map([['er', ''], ['ing', ''], ['ed', '']]));
// 'end
mapReplaceSuffix('ender', new Map([['end', 'right'], ['start', 'left']]));
// 'ender' (only suffix)
mapReplaceSuffix('ender', new Map([['er', ' game'], ['game', 'play']]), 4);
// 'end game' (only once)
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.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