first
This commit is contained in:
35
node_modules/core-js/internals/set-method-accept-set-like.js
generated
vendored
Normal file
35
node_modules/core-js/internals/set-method-accept-set-like.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
|
||||
var createSetLike = function (size) {
|
||||
return {
|
||||
size: size,
|
||||
has: function () {
|
||||
return false;
|
||||
},
|
||||
keys: function () {
|
||||
return {
|
||||
next: function () {
|
||||
return { done: true };
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = function (name) {
|
||||
var Set = getBuiltIn('Set');
|
||||
try {
|
||||
new Set()[name](createSetLike(0));
|
||||
try {
|
||||
// late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
|
||||
// https://github.com/tc39/proposal-set-methods/pull/88
|
||||
new Set()[name](createSetLike(-1));
|
||||
return false;
|
||||
} catch (error2) {
|
||||
return true;
|
||||
}
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user