1.0.0 • Published 5 years ago
nested-text-spinner v1.0.0
nested-text-spinner
Spin's a set of nested strings into plain text. Example: {hello {bob|alice}}
returns hello bob
or hello alice
Installation
$ npm install nested-text-spinner
Test
$ npm test
How to use
const spinner = require('nested-text-spinner');
let text = '{hello {bob|alice}}';
let plain = spinner.spin(text);
console.log(plain);
//result: hello bob (or) hello alice
1.0.0
5 years ago