0.0.2 • Published 8 years ago

str-render v0.0.2

Weekly downloads
13
License
ISC
Repository
github
Last release
8 years ago

Installation

npm install str-render

Usage

This is wrote following the OADS Standards.

strRender("template","replaced",..."['replacers']") => "renderedString"

Replaces a string by multiple string in ordered way.

  • "template": The original string.
  • "replaced": The string you want to be replaced.
  • ..."'replacers'": The replacers strings.

Eg:

var strRender = require('str-render');
var greeting = "Hello %s, I'm %s";

var str = strRender(greeting, '%s','Mickey','Minnie');
// str: Hello Mickey, I'm Minnie