Package Exports
- cl-strings
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cl-strings) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
String template system for multi-colour console output with interpolation.
Basically a wrapper around cli-color & lodash templates
npm install cl-strings
##Load as dependency in your project
var compile = require("cl-strings").compile
##Multi colours
var string = "{green:Hi there} {red:Shane}";
console.log(compile(string));
##Colour in strings with interpolation
var string = "{green:Hi there {:name:}}";
var params = {
name: "Shane"
}
console.log(compile(string, params));
##Partial colour with interpolation
var string = "{green:Hi there} {:name:}";
var params = {
name: "Shane"
}
console.log(compile(string, params));