Sha256: 279be7da882a716bc13ac5655a9d77fd66cea7815803bbcf09457831b02c4324

Contents?: true

Size: 881 Bytes

Versions: 10

Compression:

Stored size: 881 Bytes

Contents

var fails = require('../internals/fails');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');

var ITERATOR = wellKnownSymbol('iterator');

module.exports = !fails(function () {
  var url = new URL('b?e=1', 'http://a');
  var searchParams = url.searchParams;
  url.pathname = 'c%20d';
  return (IS_PURE && !url.toJSON)
    || !searchParams.sort
    || url.href !== 'http://a/c%20d?e=1'
    || searchParams.get('e') !== '1'
    || String(new URLSearchParams('?a=1')) !== 'a=1'
    || !searchParams[ITERATOR]
    // throws in Edge
    || new URL('https://a@b').username !== 'a'
    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
    // not punycoded in Edge
    || new URL('http://тест').host !== 'xn--e1aybc'
    // not escaped in Chrome 62-
    || new URL('http://a#б').hash !== '#%D0%B1';
});

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
condenser-0.0.8 lib/condenser/processors/node_modules/core-js-pure/internals/native-url.js
jester-data-8.0.0 node_modules/core-js/internals/native-url.js
ezii-os-5.2.1 node_modules/core-js/internals/native-url.js
ezii-os-2.0.1 node_modules/core-js/internals/native-url.js
ezii-os-1.1.0 node_modules/core-js/internals/native-url.js
ezii-os-1.0.0 node_modules/core-js/internals/native-url.js
condenser-0.0.7 lib/condenser/processors/node_modules/core-js-pure/internals/native-url.js
ezii-os-0.0.0.1.0 node_modules/core-js/internals/native-url.js
ezii-os-0.0.0.0.1 node_modules/core-js/internals/native-url.js
condenser-0.0.5 lib/condenser/processors/node_modules/core-js-pure/internals/native-url.js