core-js-pure
Advanced tools
Comparing version
'use strict'; | ||
var parent = require('../../stable/error'); | ||
require('../../modules/es.object.create'); | ||
require('../../modules/esnext.error.is-error'); | ||
module.exports = parent; |
@@ -319,2 +319,3 @@ 'use strict'; | ||
require('../modules/esnext.disposable-stack.constructor'); | ||
require('../modules/esnext.error.is-error'); | ||
require('../modules/esnext.function.demethodize'); | ||
@@ -321,0 +322,0 @@ require('../modules/esnext.function.is-callable'); |
'use strict'; | ||
var getBuiltIn = require('../internals/get-built-in'); | ||
var call = require('../internals/function-call'); | ||
@@ -25,3 +26,8 @@ var uncurryThis = require('../internals/function-uncurry-this'); | ||
return function () { | ||
call(method, this); | ||
var O = this; | ||
var Promise = getBuiltIn('Promise'); | ||
return new Promise(function (resolve) { | ||
call(method, O); | ||
resolve(undefined); | ||
}); | ||
}; | ||
@@ -28,0 +34,0 @@ } return getMethod(V, DISPOSE); |
@@ -8,5 +8,5 @@ 'use strict'; | ||
// eslint-disable-next-line es/no-reflect -- safe | ||
// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe | ||
module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () { | ||
return call.apply(apply, arguments); | ||
}); |
@@ -5,5 +5,5 @@ 'use strict'; | ||
var call = Function.prototype.call; | ||
// eslint-disable-next-line es/no-function-prototype-bind -- safe | ||
module.exports = NATIVE_BIND ? call.bind(call) : function () { | ||
return call.apply(call, arguments); | ||
}; |
@@ -6,2 +6,3 @@ 'use strict'; | ||
var call = FunctionPrototype.call; | ||
// eslint-disable-next-line es/no-function-prototype-bind -- safe | ||
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call); | ||
@@ -8,0 +9,0 @@ |
@@ -25,8 +25,9 @@ 'use strict'; | ||
// for simplification: | ||
// for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject` | ||
// for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject` | ||
// for `%IteratorHelperPrototype%.next` - just a value | ||
if (IS_ITERATOR) return state.nextHandler(); | ||
if (state.done) return createIterResultObject(undefined, true); | ||
try { | ||
var result = state.done ? undefined : state.nextHandler(); | ||
return createIterResultObject(result, state.done); | ||
var result = state.nextHandler(); | ||
return state.returnHandlerResult ? result : createIterResultObject(result, state.done); | ||
} catch (error) { | ||
@@ -61,3 +62,3 @@ state.done = true; | ||
module.exports = function (nextHandler, IS_ITERATOR) { | ||
module.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) { | ||
var IteratorProxy = function Iterator(record, state) { | ||
@@ -69,2 +70,3 @@ if (state) { | ||
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER; | ||
state.returnHandlerResult = !!RETURN_HANDLER_RESULT; | ||
state.nextHandler = nextHandler; | ||
@@ -71,0 +73,0 @@ state.counter = 0; |
'use strict'; | ||
var sign = require('../internals/math-sign'); | ||
var roundTiesToEven = require('../internals/math-round-ties-to-even'); | ||
@@ -7,8 +8,3 @@ var abs = Math.abs; | ||
var EPSILON = 2.220446049250313e-16; // Number.EPSILON | ||
var INVERSE_EPSILON = 1 / EPSILON; | ||
var roundTiesToEven = function (n) { | ||
return n + INVERSE_EPSILON - INVERSE_EPSILON; | ||
}; | ||
module.exports = function (x, FLOAT_EPSILON, FLOAT_MAX_VALUE, FLOAT_MIN_VALUE) { | ||
@@ -15,0 +11,0 @@ var n = +x; |
'use strict'; | ||
// `Math.scale` method implementation | ||
// https://rwaldron.github.io/proposal-math-extensions/ | ||
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { | ||
module.exports = function scale(x, inLow, inHigh, outLow, outHigh) { | ||
var nx = +x; | ||
@@ -6,0 +6,0 @@ var nInLow = +inLow; |
@@ -7,4 +7,6 @@ 'use strict'; | ||
var unsafeInt = '9007199254740993'; | ||
// eslint-disable-next-line es/no-nonstandard-json-properties -- feature detection | ||
var raw = JSON.rawJSON(unsafeInt); | ||
// eslint-disable-next-line es/no-nonstandard-json-properties -- feature detection | ||
return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt; | ||
}); |
@@ -38,2 +38,3 @@ 'use strict'; | ||
A[symbol] = 7; | ||
// eslint-disable-next-line es/no-array-prototype-foreach -- safe | ||
alphabet.split('').forEach(function (chr) { B[chr] = chr; }); | ||
@@ -40,0 +41,0 @@ return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet; |
@@ -10,7 +10,7 @@ 'use strict'; | ||
(store.versions || (store.versions = [])).push({ | ||
version: '3.39.0', | ||
version: '3.40.0', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE', | ||
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var log2 = require('../internals/math-log2'); | ||
var log = Math.log; | ||
var LN2 = Math.LN2; | ||
// `Math.log2` method | ||
// https://tc39.es/ecma262/#sec-math.log2 | ||
$({ target: 'Math', stat: true }, { | ||
log2: function log2(x) { | ||
return log(x) / LN2; | ||
} | ||
log2: log2 | ||
}); |
@@ -6,6 +6,10 @@ 'use strict'; | ||
var INCORRECT = !setMethodAcceptSetLike('difference', function (result) { | ||
return result.size === 0; | ||
}); | ||
// `Set.prototype.difference` method | ||
// https://tc39.es/ecma262/#sec-set.prototype.difference | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('difference') }, { | ||
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { | ||
difference: difference | ||
}); |
@@ -7,4 +7,6 @@ 'use strict'; | ||
var INCORRECT = !setMethodAcceptSetLike('intersection') || fails(function () { | ||
// eslint-disable-next-line es/no-array-from, es/no-set -- testing | ||
var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) { | ||
return result.size === 2 && result.has(1) && result.has(2); | ||
}) || fails(function () { | ||
// eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing | ||
return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2'; | ||
@@ -11,0 +13,0 @@ }); |
@@ -6,6 +6,10 @@ 'use strict'; | ||
var INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) { | ||
return !result; | ||
}); | ||
// `Set.prototype.isDisjointFrom` method | ||
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isDisjointFrom') }, { | ||
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { | ||
isDisjointFrom: isDisjointFrom | ||
}); |
@@ -6,6 +6,10 @@ 'use strict'; | ||
var INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) { | ||
return result; | ||
}); | ||
// `Set.prototype.isSubsetOf` method | ||
// https://tc39.es/ecma262/#sec-set.prototype.issubsetof | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSubsetOf') }, { | ||
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { | ||
isSubsetOf: isSubsetOf | ||
}); |
@@ -6,6 +6,10 @@ 'use strict'; | ||
var INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) { | ||
return !result; | ||
}); | ||
// `Set.prototype.isSupersetOf` method | ||
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSupersetOf') }, { | ||
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { | ||
isSupersetOf: isSupersetOf | ||
}); |
@@ -6,2 +6,3 @@ 'use strict'; | ||
// eslint-disable-next-line es/no-nonstandard-array-properties -- safe | ||
var nativeFromAsync = Array.fromAsync; | ||
@@ -8,0 +9,0 @@ // https://bugs.webkit.org/show_bug.cgi?id=271703 |
@@ -8,2 +8,3 @@ 'use strict'; | ||
var createIteratorProxy = require('../internals/iterator-create-proxy'); | ||
var createIterResultObject = require('../internals/create-iter-result-object'); | ||
@@ -20,3 +21,3 @@ var $Array = Array; | ||
this.done = true; | ||
return; | ||
return createIterResultObject(undefined, true); | ||
} | ||
@@ -34,5 +35,5 @@ var entry = iterables[iterableIndex]; | ||
} | ||
return result.value; | ||
return result; | ||
} | ||
}); | ||
}, false, true); | ||
@@ -39,0 +40,0 @@ // `Iterator.concat` method |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var f16round = require('../internals/math-f16round'); | ||
var floatRound = require('../internals/math-float-round'); | ||
var FLOAT16_EPSILON = 0.0009765625; | ||
var FLOAT16_MAX_VALUE = 65504; | ||
var FLOAT16_MIN_VALUE = 6.103515625e-05; | ||
// `Math.f16round` method | ||
// https://github.com/tc39/proposal-float16array | ||
$({ target: 'Math', stat: true }, { f16round: f16round }); | ||
$({ target: 'Math', stat: true }, { | ||
f16round: function f16round(x) { | ||
return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE); | ||
} | ||
}); |
@@ -10,2 +10,3 @@ 'use strict'; | ||
var $Array = Array; | ||
// eslint-disable-next-line es/no-nonstandard-regexp-properties -- safe | ||
var $escape = RegExp.escape; | ||
@@ -12,0 +13,0 @@ var charAt = uncurryThis(''.charAt); |
{ | ||
"name": "core-js-pure", | ||
"version": "3.39.0", | ||
"version": "3.40.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "Standard library", |
@@ -9,2 +9,3 @@ 'use strict'; | ||
require('../proposals/float16'); | ||
require('../proposals/is-error'); | ||
require('../proposals/json-parse-with-source'); | ||
@@ -11,0 +12,0 @@ require('../proposals/math-sum'); |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1119977
0.33%3563
0.17%28256
0.3%