str-render

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i str-render

Weekly Downloads

1

Version

0.0.2

License

ISC

Last publish

Collaborators

  • burawi