str-js
npm install str-js
A simple string store with nesting, singular and plural selection, and string formating.
Call str.print('with.delineated.keys');
and str will return the formatted string. If you
dont want to use .
a different delimiter can be set with str.delimiter = '_';
.
Strings can be added to the str-js at anytime by calling str.extend({ the_new: 'strings' });
Basic Example
str; str; // => 'hello'str; // => 'world'; // => 'worlds'str; // => ''
Example with Formatting
str; // all print 'hello world'str;str;str; strglobals = place: 'other world' ;str; // => 'hello other world'