diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2018-07-27 17:01:52 +0300 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2018-07-27 17:01:52 +0300 |
commit | bd2e5d89b395f948b2bccec8a0df6beaa88c8b99 (patch) | |
tree | c508a71c0ed423dc7dbec6650c47d090dd5783a8 /nginx/ngx_http_js_module.c | |
parent | 888a4a1f5e9d6a70bfa749d215e0ea541e5cd71a (diff) | |
download | njs-bd2e5d89b395f948b2bccec8a0df6beaa88c8b99.tar.gz njs-bd2e5d89b395f948b2bccec8a0df6beaa88c8b99.zip |
Added the pretty string representation for values.
Interactive shell: dumping the pretty string representation of
the last expression.
>> [1, new Number(2), {a: new String('αβZγ')}, true, console.log,
/^undef$/m, new Date(0)]
[
1,
[Number: 2],
{
a: [String: 'αβZγ']
},
true,
[Function: native],
/^undef$/m,
1970-01-01T00:00:00.000Z
]
njs.dump(value[, indent]):
Returns the pretty string representation of a value.
value - a value of any type.
indent - a number.
A number of space characters per indentation level.
njs.dump({a:[]}) -> '{a:[]}'
njs.dump({a:[]}, 1) -> '{\n a: [\n \n ]\n}'
console.log([value1[, values]])
Prints to stdout the flat pretty string representation
of values (no new lines).
console.dump([value1[, values]])
Prints to stdout the pretty string representation of values.
This fixes #11 issue on GitHub.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
0 files changed, 0 insertions, 0 deletions