Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
String formatting library inspired from Python
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore first commit
.npmignore first commit
.travis.yml Rename new-format to .travis.yml
README.md Update README.md
index.js clean
package.json 0.0.3
test.js fix conflict

README.md

format-text

String formatting library inspired from Python

Install

$ npm install new-format

Usage

format = require('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°.

Something went wrong with that request. Please try again.