-
-
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.
- Ensured proper `.length` of polyfilled functions even in compressed code - Ensured proper `.name` of polyfilled accessors - Ensured proper source / `ToString` conversion of polyfilled accessors - Refactoring
- Loading branch information
Showing
59 changed files
with
267 additions
and
234 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
5 changes: 5 additions & 0 deletions
5
packages/core-js-pure/override/internals/define-built-in-accessor.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,5 @@ | ||
var defineProperty = require('../internals/object-define-property'); | ||
|
||
module.exports = function (target, name, descriptor) { | ||
return defineProperty.f(target, name, descriptor); | ||
}; |
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
4 changes: 2 additions & 2 deletions
4
...s-pure/override/internals/redefine-all.js → ...re/override/internals/define-built-ins.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
var redefine = require('../internals/redefine'); | ||
var defineBuiltIn = require('../internals/define-built-in'); | ||
|
||
module.exports = function (target, src, options) { | ||
for (var key in src) { | ||
if (options && options.unsafe && target[key]) target[key] = src[key]; | ||
else redefine(target, key, src[key], options); | ||
else defineBuiltIn(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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = function (value) { | ||
return value; | ||
}; |
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
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
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,8 @@ | ||
var makeBuiltIn = require('../internals/make-built-in'); | ||
var defineProperty = require('../internals/object-define-property'); | ||
|
||
module.exports = function (target, name, descriptor) { | ||
if (descriptor.get) descriptor.get = makeBuiltIn(descriptor.get, name, { getter: true }); | ||
if (descriptor.set) descriptor.set = makeBuiltIn(descriptor.set, name, { setter: true }); | ||
return defineProperty.f(target, name, descriptor); | ||
}; |
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,25 @@ | ||
var global = require('../internals/global'); | ||
var isCallable = require('../internals/is-callable'); | ||
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); | ||
var makeBuiltIn = require('../internals/make-built-in'); | ||
var setGlobal = require('../internals/set-global'); | ||
|
||
module.exports = function (O, key, value, options) { | ||
var unsafe = options ? !!options.unsafe : false; | ||
var simple = options ? !!options.enumerable : false; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
var name = options && options.name !== undefined ? options.name : key; | ||
if (isCallable(value)) makeBuiltIn(value, name, options); | ||
if (O === global) { | ||
if (simple) O[key] = value; | ||
else setGlobal(key, value); | ||
return O; | ||
} else if (!unsafe) { | ||
delete O[key]; | ||
} else if (!noTargetGet && O[key]) { | ||
simple = true; | ||
} | ||
if (simple) O[key] = value; | ||
else createNonEnumerableProperty(O, key, value); | ||
return O; | ||
}; |
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 @@ | ||
var defineBuiltIn = require('../internals/define-built-in'); | ||
|
||
module.exports = function (target, src, options) { | ||
for (var key in src) defineBuiltIn(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
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
Oops, something went wrong.