core-js-pure 3.40.0 → 3.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,5 @@
1
1
  'use strict';
2
+ var parent = require('../../stable/data-view/get-float16');
2
3
  require('../../modules/esnext.data-view.get-float16');
4
+
5
+ module.exports = parent;
@@ -1,2 +1,5 @@
1
1
  'use strict';
2
+ var parent = require('../../stable/data-view/set-float16');
2
3
  require('../../modules/esnext.data-view.set-float16');
4
+
5
+ module.exports = parent;
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
+ var parent = require('../../stable/math/f16round');
2
3
  require('../../modules/esnext.math.f16round');
3
- var path = require('../../internals/path');
4
4
 
5
- module.exports = path.Math.f16round;
5
+ module.exports = parent;
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
+ var parent = require('../../stable/regexp/escape');
2
3
  require('../../modules/esnext.regexp.escape');
3
- var path = require('../../internals/path');
4
4
 
5
- module.exports = path.RegExp.escape;
5
+ module.exports = parent;
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ require('../../modules/es.data-view.get-float16');
@@ -2,6 +2,8 @@
2
2
  require('../../modules/es.array-buffer.constructor');
3
3
  require('../../modules/es.array-buffer.slice');
4
4
  require('../../modules/es.data-view');
5
+ require('../../modules/es.data-view.get-float16');
6
+ require('../../modules/es.data-view.set-float16');
5
7
  require('../../modules/es.object.to-string');
6
8
  var path = require('../../internals/path');
7
9
 
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ require('../../modules/es.data-view.set-float16');
package/es/index.js CHANGED
@@ -60,6 +60,8 @@ require('../modules/es.array-buffer.constructor');
60
60
  require('../modules/es.array-buffer.is-view');
61
61
  require('../modules/es.array-buffer.slice');
62
62
  require('../modules/es.data-view');
63
+ require('../modules/es.data-view.get-float16');
64
+ require('../modules/es.data-view.set-float16');
63
65
  require('../modules/es.array-buffer.detached');
64
66
  require('../modules/es.array-buffer.transfer');
65
67
  require('../modules/es.array-buffer.transfer-to-fixed-length');
@@ -101,6 +103,7 @@ require('../modules/es.math.clz32');
101
103
  require('../modules/es.math.cosh');
102
104
  require('../modules/es.math.expm1');
103
105
  require('../modules/es.math.fround');
106
+ require('../modules/es.math.f16round');
104
107
  require('../modules/es.math.hypot');
105
108
  require('../modules/es.math.imul');
106
109
  require('../modules/es.math.log10');
@@ -175,6 +178,7 @@ require('../modules/es.reflect.set');
175
178
  require('../modules/es.reflect.set-prototype-of');
176
179
  require('../modules/es.reflect.to-string-tag');
177
180
  require('../modules/es.regexp.constructor');
181
+ require('../modules/es.regexp.escape');
178
182
  require('../modules/es.regexp.dot-all');
179
183
  require('../modules/es.regexp.exec');
180
184
  require('../modules/es.regexp.flags');
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+ require('../../modules/es.math.f16round');
3
+ var path = require('../../internals/path');
4
+
5
+ module.exports = path.Math.f16round;
package/es/math/index.js CHANGED
@@ -7,6 +7,7 @@ require('../../modules/es.math.clz32');
7
7
  require('../../modules/es.math.cosh');
8
8
  require('../../modules/es.math.expm1');
9
9
  require('../../modules/es.math.fround');
10
+ require('../../modules/es.math.f16round');
10
11
  require('../../modules/es.math.hypot');
11
12
  require('../../modules/es.math.imul');
12
13
  require('../../modules/es.math.log10');
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+ require('../../modules/es.regexp.escape');
3
+ var path = require('../../internals/path');
4
+
5
+ module.exports = path.RegExp.escape;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  require('../../modules/es.regexp.constructor');
3
+ require('../../modules/es.regexp.escape');
3
4
  require('../../modules/es.regexp.to-string');
4
5
  require('../../modules/es.regexp.dot-all');
5
6
  require('../../modules/es.regexp.exec');
package/full/index.js CHANGED
@@ -60,6 +60,8 @@ require('../modules/es.array-buffer.constructor');
60
60
  require('../modules/es.array-buffer.is-view');
61
61
  require('../modules/es.array-buffer.slice');
62
62
  require('../modules/es.data-view');
63
+ require('../modules/es.data-view.get-float16');
64
+ require('../modules/es.data-view.set-float16');
63
65
  require('../modules/es.array-buffer.detached');
64
66
  require('../modules/es.array-buffer.transfer');
65
67
  require('../modules/es.array-buffer.transfer-to-fixed-length');
@@ -101,6 +103,7 @@ require('../modules/es.math.clz32');
101
103
  require('../modules/es.math.cosh');
102
104
  require('../modules/es.math.expm1');
103
105
  require('../modules/es.math.fround');
106
+ require('../modules/es.math.f16round');
104
107
  require('../modules/es.math.hypot');
105
108
  require('../modules/es.math.imul');
106
109
  require('../modules/es.math.log10');
@@ -175,6 +178,7 @@ require('../modules/es.reflect.set');
175
178
  require('../modules/es.reflect.set-prototype-of');
176
179
  require('../modules/es.reflect.to-string-tag');
177
180
  require('../modules/es.regexp.constructor');
181
+ require('../modules/es.regexp.escape');
178
182
  require('../modules/es.regexp.dot-all');
179
183
  require('../modules/es.regexp.exec');
180
184
  require('../modules/es.regexp.flags');
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+ var $TypeError = TypeError;
3
+
4
+ module.exports = function (argument) {
5
+ if (typeof argument == 'number') return argument;
6
+ throw new $TypeError('Argument is not a number');
7
+ };
@@ -7,9 +7,9 @@ var SHARED = '__core-js_shared__';
7
7
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
8
8
 
9
9
  (store.versions || (store.versions = [])).push({
10
- version: '3.40.0',
10
+ version: '3.41.0',
11
11
  mode: IS_PURE ? 'pure' : 'global',
12
12
  copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',
13
- license: 'https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE',
13
+ license: 'https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE',
14
14
  source: 'https://github.com/zloirock/core-js'
15
15
  });
@@ -0,0 +1 @@
1
+ // empty
@@ -0,0 +1 @@
1
+ // empty
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var floatRound = require('../internals/math-float-round');
4
+
5
+ var FLOAT16_EPSILON = 0.0009765625;
6
+ var FLOAT16_MAX_VALUE = 65504;
7
+ var FLOAT16_MIN_VALUE = 6.103515625e-05;
8
+
9
+ // `Math.f16round` method
10
+ // https://tc39.es/ecma262/#sec-math.f16round
11
+ $({ target: 'Math', stat: true }, {
12
+ f16round: function f16round(x) {
13
+ return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);
14
+ }
15
+ });
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var uncurryThis = require('../internals/function-uncurry-this');
4
+ var aString = require('../internals/a-string');
5
+ var hasOwn = require('../internals/has-own-property');
6
+ var padStart = require('../internals/string-pad').start;
7
+ var WHITESPACES = require('../internals/whitespaces');
8
+
9
+ var $Array = Array;
10
+ var $escape = RegExp.escape;
11
+ var charAt = uncurryThis(''.charAt);
12
+ var charCodeAt = uncurryThis(''.charCodeAt);
13
+ var numberToString = uncurryThis(1.1.toString);
14
+ var join = uncurryThis([].join);
15
+ var FIRST_DIGIT_OR_ASCII = /^[0-9a-z]/i;
16
+ var SYNTAX_SOLIDUS = /^[$()*+./?[\\\]^{|}]/;
17
+ var OTHER_PUNCTUATORS_AND_WHITESPACES = RegExp('^[!"#%&\',\\-:;<=>@`~' + WHITESPACES + ']');
18
+ var exec = uncurryThis(FIRST_DIGIT_OR_ASCII.exec);
19
+
20
+ var ControlEscape = {
21
+ '\u0009': 't',
22
+ '\u000A': 'n',
23
+ '\u000B': 'v',
24
+ '\u000C': 'f',
25
+ '\u000D': 'r'
26
+ };
27
+
28
+ var escapeChar = function (chr) {
29
+ var hex = numberToString(charCodeAt(chr, 0), 16);
30
+ return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0');
31
+ };
32
+
33
+ // Avoiding the use of polyfills of the previous iteration of this proposal
34
+ var FORCED = !$escape || $escape('ab') !== '\\x61b';
35
+
36
+ // `RegExp.escape` method
37
+ // https://tc39.es/ecma262/#sec-regexp.escape
38
+ $({ target: 'RegExp', stat: true, forced: FORCED }, {
39
+ escape: function escape(S) {
40
+ aString(S);
41
+ var length = S.length;
42
+ var result = $Array(length);
43
+
44
+ for (var i = 0; i < length; i++) {
45
+ var chr = charAt(S, i);
46
+ if (i === 0 && exec(FIRST_DIGIT_OR_ASCII, chr)) {
47
+ result[i] = escapeChar(chr);
48
+ } else if (hasOwn(ControlEscape, chr)) {
49
+ result[i] = '\\' + ControlEscape[chr];
50
+ } else if (exec(SYNTAX_SOLIDUS, chr)) {
51
+ result[i] = '\\' + chr;
52
+ } else if (exec(OTHER_PUNCTUATORS_AND_WHITESPACES, chr)) {
53
+ result[i] = escapeChar(chr);
54
+ } else {
55
+ var charCode = charCodeAt(chr, 0);
56
+ // single UTF-16 code unit
57
+ if ((charCode & 0xF800) !== 0xD800) result[i] = chr;
58
+ // unpaired surrogate
59
+ else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = escapeChar(chr);
60
+ // surrogate pair
61
+ else {
62
+ result[i] = chr;
63
+ result[++i] = charAt(S, i);
64
+ }
65
+ }
66
+ }
67
+
68
+ return join(result, '');
69
+ }
70
+ });
@@ -11,6 +11,7 @@ var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
11
11
  var wellKnownSymbol = require('../internals/well-known-symbol');
12
12
  var InternalStateModule = require('../internals/internal-state');
13
13
  var addDisposableResource = require('../internals/add-disposable-resource');
14
+ var V8_VERSION = require('../internals/environment-v8-version');
14
15
 
15
16
  var Promise = getBuiltIn('Promise');
16
17
  var SuppressedError = getBuiltIn('SuppressedError');
@@ -125,6 +126,10 @@ if (DESCRIPTORS) defineBuiltInAccessor(AsyncDisposableStackPrototype, 'disposed'
125
126
  defineBuiltIn(AsyncDisposableStackPrototype, ASYNC_DISPOSE, AsyncDisposableStackPrototype.disposeAsync, { name: 'disposeAsync' });
126
127
  defineBuiltIn(AsyncDisposableStackPrototype, TO_STRING_TAG, ASYNC_DISPOSABLE_STACK, { nonWritable: true });
127
128
 
128
- $({ global: true, constructor: true }, {
129
+ // https://github.com/tc39/proposal-explicit-resource-management/issues/256
130
+ // can't be detected synchronously
131
+ var SYNC_DISPOSE_RETURNING_PROMISE_RESOLUTION_BUG = V8_VERSION && V8_VERSION < 136;
132
+
133
+ $({ global: true, constructor: true, forced: SYNC_DISPOSE_RETURNING_PROMISE_RESOLUTION_BUG }, {
129
134
  AsyncDisposableStack: $AsyncDisposableStack
130
135
  });
@@ -74,7 +74,7 @@ var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
74
74
  });
75
75
  });
76
76
 
77
- // `AsyncIterator.prototype.flaMap` method
77
+ // `AsyncIterator.prototype.flatMap` method
78
78
  // https://github.com/tc39/proposal-async-iterator-helpers
79
79
  $({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE }, {
80
80
  flatMap: function flatMap(mapper) {
@@ -1,13 +1,21 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
+ var aNumber = require('../internals/a-number');
4
+ var notANaN = require('../internals/not-a-nan');
5
+ var sameValue = require('../internals/same-value');
3
6
 
4
- var min = Math.min;
5
- var max = Math.max;
7
+ var $RangeError = RangeError;
8
+ var $min = Math.min;
9
+ var $max = Math.max;
6
10
 
7
11
  // `Math.clamp` method
8
- // https://rwaldron.github.io/proposal-math-extensions/
12
+ // https://github.com/tc39/proposal-math-clamp
9
13
  $({ target: 'Math', stat: true, forced: true }, {
10
- clamp: function clamp(x, lower, upper) {
11
- return min(upper, max(lower, x));
14
+ clamp: function clamp(value, min, max) {
15
+ aNumber(value);
16
+ notANaN(aNumber(min));
17
+ notANaN(aNumber(max));
18
+ if ((sameValue(min, 0) && sameValue(max, -0)) || min > max) throw new $RangeError('`min` should be smaller than `max`');
19
+ return $min(max, $max(min, value));
12
20
  }
13
21
  });
@@ -1,15 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var floatRound = require('../internals/math-float-round');
4
-
5
- var FLOAT16_EPSILON = 0.0009765625;
6
- var FLOAT16_MAX_VALUE = 65504;
7
- var FLOAT16_MIN_VALUE = 6.103515625e-05;
8
-
9
- // `Math.f16round` method
10
- // https://github.com/tc39/proposal-float16array
11
- $({ target: 'Math', stat: true }, {
12
- f16round: function f16round(x) {
13
- return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);
14
- }
15
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.math.f16round');
@@ -1,71 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var uncurryThis = require('../internals/function-uncurry-this');
4
- var aString = require('../internals/a-string');
5
- var hasOwn = require('../internals/has-own-property');
6
- var padStart = require('../internals/string-pad').start;
7
- var WHITESPACES = require('../internals/whitespaces');
8
-
9
- var $Array = Array;
10
- // eslint-disable-next-line es/no-nonstandard-regexp-properties -- safe
11
- var $escape = RegExp.escape;
12
- var charAt = uncurryThis(''.charAt);
13
- var charCodeAt = uncurryThis(''.charCodeAt);
14
- var numberToString = uncurryThis(1.1.toString);
15
- var join = uncurryThis([].join);
16
- var FIRST_DIGIT_OR_ASCII = /^[0-9a-z]/i;
17
- var SYNTAX_SOLIDUS = /^[$()*+./?[\\\]^{|}]/;
18
- var OTHER_PUNCTUATORS_AND_WHITESPACES = RegExp('^[!"#%&\',\\-:;<=>@`~' + WHITESPACES + ']');
19
- var exec = uncurryThis(FIRST_DIGIT_OR_ASCII.exec);
20
-
21
- var ControlEscape = {
22
- '\u0009': 't',
23
- '\u000A': 'n',
24
- '\u000B': 'v',
25
- '\u000C': 'f',
26
- '\u000D': 'r'
27
- };
28
-
29
- var escapeChar = function (chr) {
30
- var hex = numberToString(charCodeAt(chr, 0), 16);
31
- return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0');
32
- };
33
-
34
- // Avoiding the use of polyfills of the previous iteration of this proposal
35
- var FORCED = !$escape || $escape('ab') !== '\\x61b';
36
-
37
- // `RegExp.escape` method
38
- // https://github.com/tc39/proposal-regex-escaping
39
- $({ target: 'RegExp', stat: true, forced: FORCED }, {
40
- escape: function escape(S) {
41
- aString(S);
42
- var length = S.length;
43
- var result = $Array(length);
44
-
45
- for (var i = 0; i < length; i++) {
46
- var chr = charAt(S, i);
47
- if (i === 0 && exec(FIRST_DIGIT_OR_ASCII, chr)) {
48
- result[i] = escapeChar(chr);
49
- } else if (hasOwn(ControlEscape, chr)) {
50
- result[i] = '\\' + ControlEscape[chr];
51
- } else if (exec(SYNTAX_SOLIDUS, chr)) {
52
- result[i] = '\\' + chr;
53
- } else if (exec(OTHER_PUNCTUATORS_AND_WHITESPACES, chr)) {
54
- result[i] = escapeChar(chr);
55
- } else {
56
- var charCode = charCodeAt(chr, 0);
57
- // single UTF-16 code unit
58
- if ((charCode & 0xF800) !== 0xD800) result[i] = chr;
59
- // unpaired surrogate
60
- else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = escapeChar(chr);
61
- // surrogate pair
62
- else {
63
- result[i] = chr;
64
- result[++i] = charAt(S, i);
65
- }
66
- }
67
- }
68
-
69
- return join(result, '');
70
- }
71
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.regexp.escape.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-js-pure",
3
- "version": "3.40.0",
3
+ "version": "3.41.0",
4
4
  "type": "commonjs",
5
5
  "description": "Standard library",
6
6
  "keywords": [
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+ // https://github.com/CanadaHonk/proposal-math-clamp
3
+ require('../modules/esnext.math.clamp');
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/data-view/get-float16');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/data-view/set-float16');
3
+
4
+ module.exports = parent;
package/stable/index.js CHANGED
@@ -60,6 +60,8 @@ require('../modules/es.array-buffer.constructor');
60
60
  require('../modules/es.array-buffer.is-view');
61
61
  require('../modules/es.array-buffer.slice');
62
62
  require('../modules/es.data-view');
63
+ require('../modules/es.data-view.get-float16');
64
+ require('../modules/es.data-view.set-float16');
63
65
  require('../modules/es.array-buffer.detached');
64
66
  require('../modules/es.array-buffer.transfer');
65
67
  require('../modules/es.array-buffer.transfer-to-fixed-length');
@@ -101,6 +103,7 @@ require('../modules/es.math.clz32');
101
103
  require('../modules/es.math.cosh');
102
104
  require('../modules/es.math.expm1');
103
105
  require('../modules/es.math.fround');
106
+ require('../modules/es.math.f16round');
104
107
  require('../modules/es.math.hypot');
105
108
  require('../modules/es.math.imul');
106
109
  require('../modules/es.math.log10');
@@ -175,6 +178,7 @@ require('../modules/es.reflect.set');
175
178
  require('../modules/es.reflect.set-prototype-of');
176
179
  require('../modules/es.reflect.to-string-tag');
177
180
  require('../modules/es.regexp.constructor');
181
+ require('../modules/es.regexp.escape');
178
182
  require('../modules/es.regexp.dot-all');
179
183
  require('../modules/es.regexp.exec');
180
184
  require('../modules/es.regexp.flags');
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/math/f16round');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/regexp/escape');
3
+
4
+ module.exports = parent;
package/stage/1.js CHANGED
@@ -8,6 +8,7 @@ require('../proposals/collection-methods');
8
8
  require('../proposals/collection-of-from');
9
9
  require('../proposals/data-view-get-set-uint8-clamped');
10
10
  require('../proposals/keys-composition');
11
+ require('../proposals/math-clamp');
11
12
  require('../proposals/math-extensions');
12
13
  require('../proposals/math-signbit');
13
14
  require('../proposals/number-from-string');
package/stage/3.js CHANGED
@@ -5,11 +5,9 @@ require('../proposals/array-buffer-base64');
5
5
  require('../proposals/array-from-async-stage-2');
6
6
  require('../proposals/decorator-metadata-v2');
7
7
  require('../proposals/explicit-resource-management');
8
- require('../proposals/float16');
9
8
  require('../proposals/is-error');
10
9
  require('../proposals/json-parse-with-source');
11
10
  require('../proposals/math-sum');
12
- require('../proposals/regexp-escaping');
13
11
  // TODO: Obsolete versions, remove from `core-js@4`
14
12
  require('../proposals/array-grouping-stage-3');
15
13
  require('../proposals/array-grouping-stage-3-2');
package/stage/4.js CHANGED
@@ -6,12 +6,14 @@ require('../proposals/array-find-from-last');
6
6
  require('../proposals/array-grouping-v2');
7
7
  require('../proposals/change-array-by-copy-stage-4');
8
8
  // require('../proposals/error-cause');
9
+ require('../proposals/float16');
9
10
  require('../proposals/global-this');
10
11
  require('../proposals/iterator-helpers-stage-3-2');
11
12
  require('../proposals/promise-all-settled');
12
13
  require('../proposals/promise-any');
13
14
  require('../proposals/promise-try');
14
15
  require('../proposals/promise-with-resolvers');
16
+ require('../proposals/regexp-escaping');
15
17
  require('../proposals/relative-indexing-method');
16
18
  require('../proposals/set-methods-v2');
17
19
  require('../proposals/string-match-all');