1.1.2 • Published 4 years ago

simple.string.format v1.1.2

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

simple.string.format

Simple String.format() in javascript.

Lightweight, Zero-dependency

NPM npm version npm bundle size GitHub issues Build Status

Getting Started

Installation

NPM

 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

Demo 1 (RunKit)

Demo 2 (codesandbox)

Demo 3 (stackblitz)

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.1.2

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago