In Chrome: ```js Object.prototype.toString.call( new URL("http://domain.com/") ) //-> [object URL] ``` In Node: ```js const URL = require("url").URL; Object.prototype.toString.call( new URL("http://domain.com/") ) //-> [object Object] ``` @jasnell
Activity
targos commentedon Dec 31, 2016
Edge and Firefox also return
[object URL]
. +1 for consistency but it would be nice to have it in the specification.stevenvachon commentedon Dec 31, 2016
url: set toStringTag for the URL class
url: set toStringTag for the URL class