0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal
Timothy Gu 99b27ce99a url: prioritize toString when stringifying
The ES addition operator calls the ToPrimitive() abstract operation
without hint String, leading a subsequent OrdinaryToPrimitive() to call
valueOf() first on an object rather than the desired toString().

Instead, use template literals which directly call ToString() abstract
operation, per Web IDL spec.

PR-URL: https://github.com/nodejs/node/pull/11737
Fixes: b610a4db1c "url: enforce valid UTF-8 in WHATWG parser"
Refs: b610a4db1c (commitcomment-21200056)
Refs: https://tc39.github.io/ecma262/#sec-addition-operator-plus-runtime-semantics-evaluation
Refs: https://tc39.github.io/ecma262/#sec-template-literals-runtime-semantics-evaluation
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-10 20:02:24 -08:00
..
cluster lib: remove unnecessary assignments with _extend 2017-02-22 10:35:25 +05:30
process lib: rename kMaxCallbacksUntilQueueIsShortened 2017-02-23 17:44:24 -08:00
streams stream: move legacy to lib/internal dir 2017-02-01 09:58:51 +01:00
bootstrap_node.js process: improve memoryUsage() performance 2017-02-23 17:19:39 -08:00
buffer.js lib: more consistent use of module.exports = {} model 2017-02-22 08:56:08 -08:00
child_process.js lib: more consistent use of module.exports = {} model 2017-02-22 08:56:08 -08:00
errors.js errors: add internal/errors.js 2017-02-09 13:46:14 -08:00
freelist.js lib: refactor internal/freelist 2017-02-22 08:55:56 -08:00
fs.js lib: more consistent use of module.exports = {} model 2017-02-22 08:56:08 -08:00
http.js http: use Symbol for outgoing headers 2017-03-09 05:50:22 -05:00
linkedlist.js lib: refactor internal/linkedlist 2017-02-22 08:55:50 -08:00
module.js benchmark,lib,test: adjust for linting 2017-01-06 14:36:01 -08:00
net.js lib: more consistent use of module.exports = {} model 2017-02-22 08:56:08 -08:00
process.js process: fix typo in comments 2017-02-26 00:46:55 +09:00
querystring.js url: fix surrogate handling in encodeAuth() 2017-02-14 12:13:11 -08:00
readline.js readline: use icu based string width calculation 2016-10-25 09:00:45 -07:00
readme.md doc: add internal modules notice 2015-08-25 11:58:50 -04:00
repl.js repl: docs-only deprecation of magic mode 2017-03-06 19:23:34 -08:00
socket_list.js lib: refactor internal/socket_list 2017-02-22 08:56:01 -08:00
url.js url: prioritize toString when stringifying 2017-03-10 20:02:24 -08:00
util.js tls: use emitWarning() for dhparam < 2048 bits 2017-02-20 06:59:30 -08:00
v8_prof_polyfill.js lib: fix TypeError in v8-polyfill 2016-10-06 10:10:19 -07:00
v8_prof_processor.js process: changed var to const in internal/v8_prof_processor 2016-09-22 09:48:47 -07:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These are subject to change at any time. Reliance on these modules outside of core is not supported in any way.