0.0.1-beta.2 • Published 2 years ago

smtfmt v0.0.1-beta.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

smtfmt

NPM Version

Utilities for formatting and printing Strings.

smtfmt is ported from SmartFormat.NET.

Installing

Install smtfmt using npm:

npm install --save smtfmt

Or yarn:

yarn add smtfmt

Examples

JavaScript:

const { fromat } = require('smtfmt');

format('Hello');                   // -> Hello
format('Hello, {0}!', 'World');    // -> Hello, World!
format('The number is {0}', 1);    // -> The number is 1
format('{0} {1}', 1, 2);           // -> 1 2

TypeScript:

import { fromat } from 'smtfmt';

format('Hello');                   // -> Hello
format('Hello, {0}!', 'World');    // -> Hello, World!
format('The number is {0}', 1);    // -> The number is 1
format('{0} {1}', 1, 2);           // -> 1 2
0.0.1-beta.2

2 years ago

0.0.1-beta.1

2 years ago

0.0.1-beta.0

2 years ago