simple.string.format
v1.1.2
Published
Simple String.format() in javascript
Downloads
21
Maintainers
Readme
simple.string.format
Simple String.format() in javascript.
Lightweight, Zero-dependency
Getting Started
Installation
npm i simple.string.format
Usage
import "simple.string.format";
let helloWorld = "Hello, {0}!".format("World");
///Hello, World!
let example1 = "Hello, {0}! this is example # {1}.".format("World", 1);
/// Hello, World! this is example # 1.
let example2 = "{0} + {0} = {1}".format(1, 2);
/// 1 + 1 = 2
let example3 = "{{0}} will be replaced with {0}".format("hi");
/// {0} will be replaced with hi
Demo
Contributors ✨
Thanks goes to these wonderful people (emoji key):