This module provides a string variables replacer.
From an array
const str = replacer('This {0} is {1}!', ['module', 'awesome']);
const str = replacer('{0}% of code coverage, it\'s {1}...', [100, 'so amazing']);
From an object
const str = replacer('{timmy} My hobby is {hobby}...', {timmy: 'Timmmmmmmyy !!', hobby: 'running'});
const str = replacer('My name is {name}, I\'m {age}.', {name: 'stimmy', age: 25});
Scripts
Run using npm run
clean - remove coverage data, Jest cache and transpiled files,
lint - lint source files and tests,
typecheck - check type annotations,
test - lint, typecheck and run tests with coverage,
test-only - run tests with coverage,
test:watch - interactive watch mode to automatically re-run tests,
build - compile source files,
build:watch - interactive watch mode, compile sources on change.
License