@azu/format-text

1.0.2 • Public • Published

@azu/format-text

String formatting library inspired from Python

Fork of azer/format-text

Install

$ npm install @azu/format-text

Usage

format = require('@azu/format-text')

format('Hello {0}. The weather is currently {1}°.', 'Kitty', '67')
// => Hello Kitty. The weather is currently 67°.

format('Hello {name}, The weather is currently {degree}°', { name:'Kitty', degree: 67 })
// => Hello Kitty. The weather is currently 67°.

Readme

Keywords

none

Package Sidebar

Install

npm i @azu/format-text

Weekly Downloads

60,577

Version

1.0.2

License

BSD-3-Clause

Unpacked Size

1.65 kB

Total Files

3

Last publish

Collaborators

  • azu