core-js-pure
Advanced tools
Comparing version 3.36.1 to 3.37.0
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/difference'); | ||
require('../../modules/esnext.set.difference.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'difference'); | ||
module.exports = parent; |
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/intersection'); | ||
require('../../modules/esnext.set.intersection.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'intersection'); | ||
module.exports = parent; |
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/is-disjoint-from'); | ||
require('../../modules/esnext.set.is-disjoint-from.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'isDisjointFrom'); | ||
module.exports = parent; |
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/is-subset-of'); | ||
require('../../modules/esnext.set.is-subset-of.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'isSubsetOf'); | ||
module.exports = parent; |
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/is-superset-of'); | ||
require('../../modules/esnext.set.is-superset-of.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'isSupersetOf'); | ||
module.exports = parent; |
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/symmetric-difference'); | ||
require('../../modules/esnext.set.symmetric-difference.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'symmetricDifference'); | ||
module.exports = parent; |
'use strict'; | ||
require('../../modules/es.set'); | ||
var parent = require('../../stable/set/union'); | ||
require('../../modules/esnext.set.union.v2'); | ||
var entryUnbind = require('../../internals/entry-unbind'); | ||
module.exports = entryUnbind('Set', 'union'); | ||
module.exports = parent; |
@@ -171,2 +171,9 @@ 'use strict'; | ||
require('../modules/es.set'); | ||
require('../modules/es.set.difference.v2'); | ||
require('../modules/es.set.intersection.v2'); | ||
require('../modules/es.set.is-disjoint-from.v2'); | ||
require('../modules/es.set.is-subset-of.v2'); | ||
require('../modules/es.set.is-superset-of.v2'); | ||
require('../modules/es.set.symmetric-difference.v2'); | ||
require('../modules/es.set.union.v2'); | ||
require('../modules/es.string.at-alternative'); | ||
@@ -173,0 +180,0 @@ require('../modules/es.string.code-point-at'); |
@@ -5,2 +5,9 @@ 'use strict'; | ||
require('../../modules/es.set'); | ||
require('../../modules/es.set.difference.v2'); | ||
require('../../modules/es.set.intersection.v2'); | ||
require('../../modules/es.set.is-disjoint-from.v2'); | ||
require('../../modules/es.set.is-subset-of.v2'); | ||
require('../../modules/es.set.is-superset-of.v2'); | ||
require('../../modules/es.set.symmetric-difference.v2'); | ||
require('../../modules/es.set.union.v2'); | ||
require('../../modules/es.string.iterator'); | ||
@@ -7,0 +14,0 @@ var path = require('../../internals/path'); |
@@ -171,2 +171,9 @@ 'use strict'; | ||
require('../modules/es.set'); | ||
require('../modules/es.set.difference.v2'); | ||
require('../modules/es.set.intersection.v2'); | ||
require('../modules/es.set.is-disjoint-from.v2'); | ||
require('../modules/es.set.is-subset-of.v2'); | ||
require('../modules/es.set.is-superset-of.v2'); | ||
require('../modules/es.set.symmetric-difference.v2'); | ||
require('../modules/es.set.union.v2'); | ||
require('../modules/es.string.at-alternative'); | ||
@@ -359,2 +366,3 @@ require('../modules/es.string.code-point-at'); | ||
require('../modules/esnext.math.signbit'); | ||
require('../modules/esnext.math.sum-precise'); | ||
require('../modules/esnext.math.umulh'); | ||
@@ -417,2 +425,3 @@ require('../modules/esnext.number.from-string'); | ||
require('../modules/esnext.symbol.async-dispose'); | ||
require('../modules/esnext.symbol.custom-matcher'); | ||
require('../modules/esnext.symbol.dispose'); | ||
@@ -468,2 +477,3 @@ require('../modules/esnext.symbol.is-registered-symbol'); | ||
require('../modules/web.url.can-parse'); | ||
require('../modules/web.url.parse'); | ||
require('../modules/web.url.to-json'); | ||
@@ -470,0 +480,0 @@ require('../modules/web.url-search-params'); |
'use strict'; | ||
var parent = require('../../actual/math'); | ||
require('../../modules/es.array.iterator'); | ||
require('../../modules/esnext.math.clamp'); | ||
@@ -12,2 +13,3 @@ require('../../modules/esnext.math.deg-per-rad'); | ||
require('../../modules/esnext.math.signbit'); | ||
require('../../modules/esnext.math.sum-precise'); | ||
// TODO: Remove from `core-js@4` | ||
@@ -14,0 +16,0 @@ require('../../modules/esnext.math.iaddh'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
require('../../modules/esnext.symbol.is-well-known-symbol'); | ||
require('../../modules/esnext.symbol.matcher'); | ||
require('../../modules/esnext.symbol.custom-matcher'); | ||
require('../../modules/esnext.symbol.observable'); | ||
@@ -11,2 +11,3 @@ // TODO: Remove from `core-js@4` | ||
require('../../modules/esnext.symbol.is-well-known'); | ||
require('../../modules/esnext.symbol.matcher'); | ||
require('../../modules/esnext.symbol.metadata-key'); | ||
@@ -13,0 +14,0 @@ require('../../modules/esnext.symbol.pattern-match'); |
@@ -23,2 +23,3 @@ 'use strict'; | ||
method = getMethod(V, DISPOSE); | ||
if (method === undefined) return method; | ||
return function () { | ||
@@ -25,0 +26,0 @@ call(method, this); |
@@ -10,7 +10,7 @@ 'use strict'; | ||
(store.versions || (store.versions = [])).push({ | ||
version: '3.36.1', | ||
version: '3.37.0', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); |
@@ -9,2 +9,3 @@ 'use strict'; | ||
var IS_PURE = require('../internals/is-pure'); | ||
var fails = require('../internals/fails'); | ||
@@ -17,5 +18,11 @@ var Map = MapHelpers.Map; | ||
var DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () { | ||
return Map.groupBy('ab', function (it) { | ||
return it; | ||
}).get('a').length !== 1; | ||
}); | ||
// `Map.groupBy` method | ||
// https://github.com/tc39/proposal-array-grouping | ||
$({ target: 'Map', stat: true, forced: IS_PURE }, { | ||
$({ target: 'Map', stat: true, forced: IS_PURE || DOES_NOT_WORK_WITH_PRIMITIVES }, { | ||
groupBy: function groupBy(items, callbackfn) { | ||
@@ -22,0 +29,0 @@ requireObjectCoercible(items); |
@@ -9,9 +9,18 @@ 'use strict'; | ||
var iterate = require('../internals/iterate'); | ||
var fails = require('../internals/fails'); | ||
// eslint-disable-next-line es/no-object-map-groupby -- testing | ||
var nativeGroupBy = Object.groupBy; | ||
var create = getBuiltIn('Object', 'create'); | ||
var push = uncurryThis([].push); | ||
var DOES_NOT_WORK_WITH_PRIMITIVES = !nativeGroupBy || fails(function () { | ||
return nativeGroupBy('ab', function (it) { | ||
return it; | ||
}).a.length !== 1; | ||
}); | ||
// `Object.groupBy` method | ||
// https://github.com/tc39/proposal-array-grouping | ||
$({ target: 'Object', stat: true }, { | ||
$({ target: 'Object', stat: true, forced: DOES_NOT_WORK_WITH_PRIMITIVES }, { | ||
groupBy: function groupBy(items, callbackfn) { | ||
@@ -18,0 +27,0 @@ requireObjectCoercible(items); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var fromAsync = require('../internals/array-from-async'); | ||
var fails = require('../internals/fails'); | ||
var nativeFromAsync = Array.fromAsync; | ||
// https://bugs.webkit.org/show_bug.cgi?id=271703 | ||
var INCORRECT_CONSTRUCTURING = !nativeFromAsync || fails(function () { | ||
var counter = 0; | ||
nativeFromAsync.call(function () { | ||
counter++; | ||
return []; | ||
}, { length: 0 }); | ||
return counter !== 1; | ||
}); | ||
// `Array.fromAsync` method | ||
// https://github.com/tc39/proposal-array-from-async | ||
$({ target: 'Array', stat: true }, { | ||
$({ target: 'Array', stat: true, forced: INCORRECT_CONSTRUCTURING }, { | ||
fromAsync: fromAsync | ||
}); |
@@ -75,3 +75,3 @@ 'use strict'; | ||
var disposeMethod = stack[--i]; | ||
stack[i] = null; | ||
stack[i] = undefined; | ||
try { | ||
@@ -83,3 +83,3 @@ Promise.resolve(disposeMethod()).then(loop, handleError); | ||
} else { | ||
internalState.stack = null; | ||
internalState.stack = undefined; | ||
thrown ? reject(suppressed) : resolve(undefined); | ||
@@ -86,0 +86,0 @@ } |
@@ -59,3 +59,3 @@ 'use strict'; | ||
var disposeMethod = stack[--i]; | ||
stack[i] = null; | ||
stack[i] = undefined; | ||
try { | ||
@@ -72,3 +72,3 @@ disposeMethod(); | ||
} | ||
internalState.stack = null; | ||
internalState.stack = undefined; | ||
if (thrown) throw suppressed; | ||
@@ -75,0 +75,0 @@ }, |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var apply = require('../internals/function-apply'); | ||
var slice = require('../internals/array-slice'); | ||
var newPromiseCapabilityModule = require('../internals/new-promise-capability'); | ||
var aCallable = require('../internals/a-callable'); | ||
var perform = require('../internals/perform'); | ||
@@ -9,5 +12,8 @@ | ||
$({ target: 'Promise', stat: true, forced: true }, { | ||
'try': function (callbackfn) { | ||
'try': function (callbackfn /* , ...args */) { | ||
var args = slice(arguments, 1); | ||
var promiseCapability = newPromiseCapabilityModule.f(this); | ||
var result = perform(callbackfn); | ||
var result = perform(function () { | ||
return apply(aCallable(callbackfn), undefined, args); | ||
}); | ||
(result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value); | ||
@@ -14,0 +20,0 @@ return promiseCapability.promise; |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var toString = require('../internals/to-string'); | ||
var padStart = require('../internals/string-pad').start; | ||
var WHITESPACES = require('../internals/whitespaces'); | ||
@@ -10,2 +11,3 @@ | ||
var replace = uncurryThis(''.replace); | ||
var numberToString = uncurryThis(1.1.toString); | ||
var NEED_ESCAPING = RegExp('[!"#$%&\'()*+,\\-./:;<=>?@[\\\\\\]^`{|}~' + WHITESPACES + ']', 'g'); | ||
@@ -20,4 +22,7 @@ | ||
// escape first DecimalDigit | ||
return (firstCode > 47 && firstCode < 58 ? '\\x3' : '') + replace(str, NEED_ESCAPING, '\\$&'); | ||
return (firstCode > 47 && firstCode < 58 ? '\\x3' : '') + replace(str, NEED_ESCAPING, function (match) { | ||
var hex = numberToString(charCodeAt(match, 0), 16); | ||
return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0'); | ||
}); | ||
} | ||
}); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var difference = require('../internals/set-difference'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
// `Set.prototype.difference` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('difference') }, { | ||
difference: difference | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.difference.v2'); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var fails = require('../internals/fails'); | ||
var intersection = require('../internals/set-intersection'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
var INCORRECT = !setMethodAcceptSetLike('intersection') || fails(function () { | ||
// eslint-disable-next-line es/no-array-from, es/no-set -- testing | ||
return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2'; | ||
}); | ||
// `Set.prototype.intersection` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { | ||
intersection: intersection | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.intersection.v2'); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var isDisjointFrom = require('../internals/set-is-disjoint-from'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
// `Set.prototype.isDisjointFrom` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isDisjointFrom') }, { | ||
isDisjointFrom: isDisjointFrom | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.is-disjoint-from.v2'); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var isSubsetOf = require('../internals/set-is-subset-of'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
// `Set.prototype.isSubsetOf` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSubsetOf') }, { | ||
isSubsetOf: isSubsetOf | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.is-subset-of.v2'); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var isSupersetOf = require('../internals/set-is-superset-of'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
// `Set.prototype.isSupersetOf` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('isSupersetOf') }, { | ||
isSupersetOf: isSupersetOf | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.is-superset-of.v2'); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var symmetricDifference = require('../internals/set-symmetric-difference'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
// `Set.prototype.symmetricDifference` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('symmetricDifference') }, { | ||
symmetricDifference: symmetricDifference | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.symmetric-difference.v2'); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var union = require('../internals/set-union'); | ||
var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); | ||
// `Set.prototype.union` method | ||
// https://github.com/tc39/proposal-set-methods | ||
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, { | ||
union: union | ||
}); | ||
// TODO: Remove from `core-js@4` | ||
require('../modules/es.set.union.v2'); |
{ | ||
"name": "core-js-pure", | ||
"version": "3.36.1", | ||
"version": "3.37.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "Standard library", |
@@ -171,2 +171,9 @@ 'use strict'; | ||
require('../modules/es.set'); | ||
require('../modules/es.set.difference.v2'); | ||
require('../modules/es.set.intersection.v2'); | ||
require('../modules/es.set.is-disjoint-from.v2'); | ||
require('../modules/es.set.is-subset-of.v2'); | ||
require('../modules/es.set.is-superset-of.v2'); | ||
require('../modules/es.set.symmetric-difference.v2'); | ||
require('../modules/es.set.union.v2'); | ||
require('../modules/es.string.at-alternative'); | ||
@@ -265,2 +272,3 @@ require('../modules/es.string.code-point-at'); | ||
require('../modules/web.url.can-parse'); | ||
require('../modules/web.url.parse'); | ||
require('../modules/web.url.to-json'); | ||
@@ -267,0 +275,0 @@ require('../modules/web.url-search-params'); |
@@ -10,2 +10,3 @@ 'use strict'; | ||
require('../proposals/data-view-get-set-uint8-clamped'); | ||
require('../proposals/extractors'); | ||
require('../proposals/keys-composition'); | ||
@@ -17,3 +18,3 @@ require('../proposals/math-extensions'); | ||
require('../proposals/observable'); | ||
require('../proposals/pattern-matching'); | ||
require('../proposals/pattern-matching-v2'); | ||
require('../proposals/seeded-random'); | ||
@@ -26,4 +27,5 @@ require('../proposals/string-code-points'); | ||
require('../proposals/number-range'); | ||
require('../proposals/pattern-matching'); | ||
require('../proposals/string-replace-all'); | ||
module.exports = parent; |
'use strict'; | ||
var parent = require('./3'); | ||
// nothing | ||
require('../proposals/math-sum'); | ||
require('../proposals/promise-try'); | ||
module.exports = parent; |
@@ -8,3 +8,2 @@ 'use strict'; | ||
require('../proposals/map-upsert-stage-2'); | ||
require('../proposals/promise-try'); | ||
require('../proposals/regexp-escaping'); | ||
@@ -11,0 +10,0 @@ require('../proposals/string-dedent'); |
@@ -11,3 +11,2 @@ 'use strict'; | ||
require('../proposals/json-parse-with-source'); | ||
require('../proposals/set-methods-v2'); | ||
// TODO: Obsolete versions, remove from `core-js@4` | ||
@@ -14,0 +13,0 @@ require('../proposals/array-grouping-stage-3'); |
@@ -14,2 +14,3 @@ 'use strict'; | ||
require('../proposals/relative-indexing-method'); | ||
require('../proposals/set-methods-v2'); | ||
require('../proposals/string-match-all'); | ||
@@ -16,0 +17,0 @@ require('../proposals/string-replace-all-stage-4'); |
@@ -16,2 +16,3 @@ 'use strict'; | ||
require('../modules/web.url.can-parse'); | ||
require('../modules/web.url.parse'); | ||
require('../modules/web.url.to-json'); | ||
@@ -18,0 +19,0 @@ require('../modules/web.url-search-params'); |
@@ -5,2 +5,3 @@ 'use strict'; | ||
require('../modules/web.url.can-parse'); | ||
require('../modules/web.url.parse'); | ||
require('../modules/web.url.to-json'); | ||
@@ -7,0 +8,0 @@ var path = require('../internals/path'); |
1086971
3487
27406