Skip to content

netr/nested-text-spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Require

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

Import

import spin from 'nested-text-spinner';

let text = '{hello {bob|alice}}';
let plain = spin(text);
console.log(plain);

//result: hello bob (or) hello alice

About

Spins a set of nested strings into plain text.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published