Miss any of our Open RFC calls?Watch the recordings here! »

@pelevesque/substitute-chars

0.0.3 • Public • Published

Build Status Coverage Status JavaScript Style Guide

substitute-chars

Substitutes chars in a string.

Node Repository

https://www.npmjs.com/package/@pelevesque/substitute-chars

Installation

npm install @pelevesque/substitute-chars

Tests

Standard Style & Unit Tests

npm test

Unit Tests & Coverage

npm run cover

Usage

const substituteChars = require('@pelevesque/substitute-chars')
const str = 'abbcabcc'
const substitutions = [
  ['a', '1'],
  ['b', '2'],
  ['c', '3']
]
const result = substituteChars(str, substitutions)
// result === '12231233'

Install

npm i @pelevesque/substitute-chars

DownloadsWeekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

6.09 kB

Total Files

6

Last publish

Collaborators

  • avatar