mention %j specifier in readme

This commit is contained in:
Sami Samhuri 2016-03-19 11:43:50 -06:00
parent 4f89809675
commit 93c6cf623e

View file

@ -31,16 +31,21 @@ Usage
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.
// you can format values as JSON with %j
var value = {answer: 42}
format('%j', value)
// => '{"answer":42}'
See `man 3 printf` or `man 1 printf` for details.
Supported format specifiers: b, c, d, f, j, o, s, x, and X.
See `man 3 printf` or `man 1 printf` for details. `j` is an extension that formats values as JSON.
Precision is supported for floating point numbers.
License
=======
Copyright 2010 - 2014 Sami Samhuri sami@samhuri.net
Copyright 2010 - 2016 Sami Samhuri sami@samhuri.net
[MIT license](http://sjs.mit-license.org)