mirror of
https://github.com/samsonjs/format.git
synced 2026-03-25 08:45:53 +00:00
mention %j specifier in readme
This commit is contained in:
parent
4f89809675
commit
93c6cf623e
1 changed files with 8 additions and 3 deletions
11
Readme.md
11
Readme.md
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue