update readme

This commit is contained in:
Sami Samhuri 2013-03-07 20:21:03 -08:00
parent 1bc06f0f15
commit 5e05fc2925

View file

@ -15,9 +15,11 @@ or otherwise include them with your other JavaScript.
Usage
=====
var Format = require('format')
, printf = Format.printf
, format = Format.format // aliased as sprintf as well
var format = require('format')
, printf = format.printf
, vsprintf = format.vsprintf
// or if you want to keep it old school
, sprintf = format
// Print 'hello world'
printf('%s world', 'hello')
@ -26,6 +28,9 @@ Usage
format('%d is the answer to %s', 42, what)
// => '42 is the answer to life, the universe, and everything'
vsprintf('%d is the answer to %s', [42, what])
// => '42 is the answer to life, the universe, and everything'
Supported format specifiers: b, c, d, f, o, s, x, and X.
See `man 3 printf` or `man 1 printf` for details.
@ -34,6 +39,6 @@ See `man 3 printf` or `man 1 printf` for details.
License
=======
Copyright 2010 - 2011 Sami Samhuri sami@samhuri.net
Copyright 2010 - 2013 Sami Samhuri sami@samhuri.net
ISC (see included [LICENSE](/samsonjs/format/blob/master/LICENSE))
ISC (like MIT) (see included [LICENSE](/samsonjs/format/blob/master/LICENSE))