web.url.to-json.js 273 B

12345678910
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. // `URL.prototype.toJSON` method
  4. // https://url.spec.whatwg.org/#dom-url-tojson
  5. $({ target: 'URL', proto: true, enumerable: true }, {
  6. toJSON: function toJSON() {
  7. return URL.prototype.toString.call(this);
  8. }
  9. });