0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Ruben Bridgewater b3e93a91eb
util: do not escape single quotes if not necessary
Right now util.inspect will always escape single quotes. That is not
necessary though in case the string that will be escaped does not
contain double quotes. In that case the string can simply be wrapped
in double quotes instead.
If the string contains single and double quotes and it does not
contain `${` as part of the string, backticks will be used instead.
That makes sure only very few strings have to escape quotes at all.
Thus it increases the readability of these strings.

PR-URL: https://github.com/nodejs/node/pull/21624
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-07-16 14:18:25 +02:00
..
internal process: refactor emitWarning 2018-07-16 11:36:45 +02:00
_http_agent.js http: fix request with option timeout and agent 2018-07-13 18:44:03 +02:00
_http_client.js http: fix request with option timeout and agent 2018-07-13 18:44:03 +02:00
_http_common.js http: remove a pair of outdated comments 2018-06-10 20:25:43 -07:00
_http_incoming.js http: added aborted property to request 2018-04-26 19:38:27 +02:00
_http_outgoing.js lib: consolidate redundant require() calls 2018-07-09 22:50:37 -04:00
_http_server.js http: fix res emit close before user finish 2018-05-24 13:23:57 -04:00
_stream_duplex.js stream: only check options once in Duplex ctor 2018-04-28 17:13:55 +02:00
_stream_passthrough.js
_stream_readable.js stream: inline needMoreData function 2018-06-02 14:18:40 +02:00
_stream_transform.js
_stream_wrap.js
_stream_writable.js stream: simplify writable's validChunk() 2018-05-14 13:30:56 -04:00
_tls_common.js tls: specify options.name in validateKeyCert 2018-04-27 07:12:26 +02:00
_tls_wrap.js lib,src: remove openssl feature conditionals 2018-06-08 00:53:37 +02:00
.eslintrc.yaml tools: stricter eslint rule for globals 2018-05-18 15:27:29 +02:00
assert.js assert: improve simple assert 2018-07-16 11:30:55 +02:00
async_hooks.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
buffer.js errors: validate input arguments 2018-04-13 19:59:44 +02:00
child_process.js child_process: change windowsHide default to true 2018-06-20 11:02:01 -04:00
cluster.js
console.js console: fix timeEnd() not coercing the input 2018-07-16 11:24:34 +02:00
constants.js constants: freeze the constants object 2018-05-07 14:26:11 +02:00
crypto.js crypto: remove deprecated legacy API 2018-07-13 17:47:13 +03:00
dgram.js dns: lazy loaded 2018-05-18 15:25:42 +02:00
dns.js dns: add promisified dns module 2018-06-20 13:35:27 -04:00
domain.js domain: converted anonymous to named function 2018-04-17 23:44:14 -07:00
events.js events: optimize condition for optimal scenario 2018-05-03 14:45:09 +02:00
fs.js fs: throw ERR_INVALID_ARG_VALUE when buffer being written is empty 2018-07-15 19:09:19 +08:00
http2.js
http.js http: allow url and options to be passed to http*.request and http*.get 2018-07-13 14:09:39 +01:00
https.js lib,src: remove openssl feature conditionals 2018-06-08 00:53:37 +02:00
inspector.js inspector: expose original console 2018-07-07 00:04:52 +02:00
module.js
net.js http: fix request with option timeout and agent 2018-07-13 18:44:03 +02:00
os.js lib: remove unnecessary assignment of exports 2018-04-22 11:39:16 +02:00
path.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
perf_hooks.js perf_hooks: remove less useful bootstrap marks 2018-06-15 09:05:19 -07:00
process.js
punycode.js
querystring.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
readline.js repl: changes ctrl+u to delete from cursor to line start 2018-05-18 15:56:14 +02:00
repl.js repl: make own properties shadow prototype properties 2018-07-13 18:57:16 +02:00
stream.js stream: add pipeline and finished 2018-04-16 16:02:12 +02:00
string_decoder.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
sys.js
timers.js src: refactor timers to remove TimerWrap 2018-06-24 21:35:05 -07:00
tls.js doc: fix inconsistent documentation (host vs hostname) 2018-06-01 11:10:50 +02:00
trace_events.js trace_events: adds a new trace_events api 2018-04-17 08:30:20 -07:00
tty.js readline: lazy loaded 2018-05-18 15:25:40 +02:00
url.js lib: remove unnecessary require 2018-05-18 15:32:05 +02:00
util.js util: do not escape single quotes if not necessary 2018-07-16 14:18:25 +02:00
v8.js v8: replace Buffer with FastBuffer in deserialize 2018-06-14 11:47:53 +05:30
vm.js lib: introduce internal/validators 2018-04-26 19:42:48 +02:00
worker_threads.js worker: rename to worker_threads 2018-06-06 19:44:15 +02:00
zlib.js zlib: removed extra util require 2018-06-05 18:57:44 -07:00