-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial
URL
and URLSearchParams
commit
- Loading branch information
Showing
35 changed files
with
2,678 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
var hide = require('../internals/hide'); | ||
var redefine = require('../internals/redefine'); | ||
|
||
module.exports = function (target, src, safe) { | ||
module.exports = function (target, src, options) { | ||
for (var key in src) { | ||
if (safe && target[key]) target[key] = src[key]; | ||
else hide(target, key, src[key]); | ||
if (options && options.unsafe && target[key]) target[key] = src[key]; | ||
else redefine(target, key, src[key], options); | ||
} return target; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
module.exports = require('../internals/hide'); | ||
var hide = require('../internals/hide'); | ||
|
||
module.exports = function (target, key, value, options) { | ||
if (options && options.enumerable) target[key] = value; | ||
else hide(target, key, value); | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/core-js-pure/override/modules/web.url-search-params.sort.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require('../../modules/web.url-search-params'); | ||
require('../../modules/web.url-search-params.sort'); | ||
|
||
module.exports = require('../../internals/path').URLSearchParams; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('../../modules/web.url-search-params.sort'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require('../../modules/web.url'); | ||
require('../../modules/web.url.to-json'); | ||
require('../../modules/web.url-search-params'); | ||
require('../../modules/web.url-search-params.sort'); | ||
|
||
module.exports = require('../../internals/path').URL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('../../modules/web.url.to-json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var IS_PURE = require('../internals/is-pure'); | ||
var ITERATOR = require('../internals/well-known-symbol')('iterator'); | ||
|
||
module.exports = !require('../internals/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]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
var redefine = require('../internals/redefine'); | ||
|
||
module.exports = function (target, src, safe) { | ||
for (var key in src) redefine(target, key, src[key], safe); | ||
module.exports = function (target, src, options) { | ||
for (var key in src) redefine(target, key, src[key], options); | ||
return target; | ||
}; |
Oops, something went wrong.