2.0.0 • Published 5 years ago

string-stitch v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

@iwatt/string-stitch

A clean interface for JS string interpolation

Install

$ npm install @iwatt/string-stitch

Usage

Currently - stringstitch supports the ability to embed objects into template strings!

const Stitcher = require("string-stitch");

const template = "Hello ${name}"; 
const args = {
  name: "iwatt",
}

const myStitch = new Stitcher(template, args);

console.log(myStitch.embed()); // "Hello iwatt"