nested-text-spinner

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i nested-text-spinner

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.12 kB

Total Files

4

Last publish

Collaborators

  • cojax