@karmaniverous/chain-replace
v0.1.5
Published
Apply a chain of replacements to a string.
Downloads
27
Readme
chain-replace
To install:
npm install @karmaniverous/chain-replace
To import:
import { chainReplace } from '@karmaniverous/chain-replace`;
See tests for examples of usage!
API Documentation
chainReplace(input, [replacements]) ⇒ string
Apply a chain of replacements to a string.
Kind: global function
Returns: string - String result of chained replacements.
| Param | Type | Description | | --- | --- | --- | | input | string | Input string. | | [replacements] | Array.<Array.<(string|Object), string>> | Replacements array of [pattern: string|RegExp, replacement: string]. |
See more great templates and other tools on my GitHub Profile!