collect-your-stuff 1.2.2 → 1.2.3

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.
@@ -2789,7 +2789,7 @@
2789
2789
  })
2790
2790
  } else {
2791
2791
  var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER
2792
- /* eslint-disable no-new -- required for testing */
2792
+ /* eslint-disable no-new, sonar/inconsistent-function-call -- required for testing */
2793
2793
  if (!fails(function () {
2794
2794
  NativeArrayBuffer(1)
2795
2795
  }) || !fails(function () {
@@ -2800,7 +2800,7 @@
2800
2800
  new NativeArrayBuffer(NaN)
2801
2801
  return NativeArrayBuffer.length !== 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME
2802
2802
  })) {
2803
- /* eslint-enable no-new -- required for testing */
2803
+ /* eslint-enable no-new, sonar/inconsistent-function-call -- required for testing */
2804
2804
  $ArrayBuffer = function ArrayBuffer (length) {
2805
2805
  anInstance(this, ArrayBufferPrototype)
2806
2806
  return inheritIfRequired(new NativeArrayBuffer(toIndex(length)), this, $ArrayBuffer)
@@ -3772,8 +3772,8 @@
3772
3772
  setInternalState(that, {
3773
3773
  type: CONSTRUCTOR_NAME,
3774
3774
  index: create(null),
3775
- first: undefined,
3776
- last: undefined,
3775
+ first: null,
3776
+ last: null,
3777
3777
  size: 0
3778
3778
  })
3779
3779
  if (!DESCRIPTORS) that.size = 0
@@ -3798,7 +3798,7 @@
3798
3798
  key: key,
3799
3799
  value: value,
3800
3800
  previous: previous = state.last,
3801
- next: undefined,
3801
+ next: null,
3802
3802
  removed: false
3803
3803
  }
3804
3804
  if (!state.first) state.first = entry
@@ -3832,10 +3832,10 @@
3832
3832
  var entry = state.first
3833
3833
  while (entry) {
3834
3834
  entry.removed = true
3835
- if (entry.previous) entry.previous = entry.previous.next = undefined
3835
+ if (entry.previous) entry.previous = entry.previous.next = null
3836
3836
  entry = entry.next
3837
3837
  }
3838
- state.first = state.last = undefined
3838
+ state.first = state.last = null
3839
3839
  state.index = create(null)
3840
3840
  if (DESCRIPTORS) state.size = 0
3841
3841
  else that.size = 0
@@ -3929,7 +3929,7 @@
3929
3929
  target: iterated,
3930
3930
  state: getInternalCollectionState(iterated),
3931
3931
  kind: kind,
3932
- last: undefined
3932
+ last: null
3933
3933
  })
3934
3934
  }, function () {
3935
3935
  var state = getInternalIteratorState(this)
@@ -3940,7 +3940,7 @@
3940
3940
  // get next entry
3941
3941
  if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
3942
3942
  // or finish the iteration
3943
- state.target = undefined
3943
+ state.target = null
3944
3944
  return createIterResultObject(undefined, true)
3945
3945
  }
3946
3946
  // return step by kind
@@ -4021,7 +4021,7 @@
4021
4021
  setInternalState(that, {
4022
4022
  type: CONSTRUCTOR_NAME,
4023
4023
  id: id++,
4024
- frozen: undefined
4024
+ frozen: null
4025
4025
  })
4026
4026
  if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP })
4027
4027
  })
@@ -4069,7 +4069,7 @@
4069
4069
  if (isObject(key)) {
4070
4070
  var data = getWeakData(key)
4071
4071
  if (data === true) return uncaughtFrozenStore(state).get(key)
4072
- return data ? data[state.id] : undefined
4072
+ if (data) return data[state.id]
4073
4073
  }
4074
4074
  },
4075
4075
  // `WeakMap.prototype.set(key, value)` method
@@ -7136,6 +7136,8 @@
7136
7136
  }, {}],
7137
7137
  198: [function (require, module, exports) {
7138
7138
  'use strict'
7139
+ /* eslint-disable no-undef, no-useless-call, sonar/no-reference-error -- required for testing */
7140
+ /* eslint-disable es/no-legacy-object-prototype-accessor-methods -- required for testing */
7139
7141
  var IS_PURE = require('../internals/is-pure')
7140
7142
  var globalThis = require('../internals/global-this')
7141
7143
  var fails = require('../internals/fails')
@@ -7148,7 +7150,6 @@
7148
7150
  if (WEBKIT && WEBKIT < 535) return
7149
7151
  var key = Math.random()
7150
7152
  // In FF throws only define methods
7151
- // eslint-disable-next-line no-undef, no-useless-call, es/no-legacy-object-prototype-accessor-methods -- required for testing
7152
7153
  __defineSetter__.call(null, key, function () { /* empty */ })
7153
7154
  delete globalThis[key]
7154
7155
  })
@@ -8048,10 +8049,10 @@
8048
8049
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
8049
8050
 
8050
8051
  (store.versions || (store.versions = [])).push({
8051
- version: '3.38.0',
8052
+ version: '3.38.1',
8052
8053
  mode: IS_PURE ? 'pure' : 'global',
8053
8054
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
8054
- license: 'https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE',
8055
+ license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
8055
8056
  source: 'https://github.com/zloirock/core-js'
8056
8057
  })
8057
8058
  }, { '../internals/define-global-property': 83, '../internals/global-this': 131, '../internals/is-pure': 155 }],
@@ -9095,7 +9096,7 @@
9095
9096
  }, { '../internals/an-instance': 29, '../internals/array-buffer': 38, '../internals/array-buffer-view-core': 37, '../internals/array-from-constructor-and-list': 42, '../internals/array-iteration': 46, '../internals/classof': 66, '../internals/create-non-enumerable-property': 75, '../internals/create-property-descriptor': 76, '../internals/define-built-in-accessor': 80, '../internals/descriptors': 85, '../internals/export': 107, '../internals/function-call': 116, '../internals/global-this': 131, '../internals/has-own-property': 132, '../internals/inherit-if-required': 139, '../internals/internal-state': 143, '../internals/is-integral-number': 151, '../internals/is-object': 153, '../internals/is-symbol': 157, '../internals/object-create': 185, '../internals/object-define-property': 187, '../internals/object-get-own-property-descriptor': 188, '../internals/object-get-own-property-names': 190, '../internals/object-is-prototype-of': 194, '../internals/object-set-prototype-of': 199, '../internals/set-species': 233, '../internals/to-index': 259, '../internals/to-length': 262, '../internals/to-offset': 264, '../internals/to-property-key': 267, '../internals/to-uint8-clamped': 270, '../internals/typed-array-constructors-require-wrappers': 273, '../internals/typed-array-from': 275 }],
9096
9097
  273: [function (require, module, exports) {
9097
9098
  'use strict'
9098
- /* eslint-disable no-new -- required for testing */
9099
+ /* eslint-disable no-new, sonar/inconsistent-function-call -- required for testing */
9099
9100
  var globalThis = require('../internals/global-this')
9100
9101
  var fails = require('../internals/fails')
9101
9102
  var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration')
@@ -10004,7 +10005,7 @@
10004
10005
  var target = state.target
10005
10006
  var index = state.index++
10006
10007
  if (!target || index >= target.length) {
10007
- state.target = undefined
10008
+ state.target = null
10008
10009
  return createIterResultObject(undefined, true)
10009
10010
  }
10010
10011
  switch (state.kind) {
@@ -12880,7 +12881,7 @@
12880
12881
  reactions: new Queue(),
12881
12882
  rejection: false,
12882
12883
  state: PENDING,
12883
- value: undefined
12884
+ value: null
12884
12885
  })
12885
12886
  }
12886
12887
 
@@ -13470,6 +13471,7 @@
13470
13471
  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {
13471
13472
  re2[MATCH] = false
13472
13473
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
13474
+ // eslint-disable-next-line sonar/inconsistent-function-call -- required for testing
13473
13475
  return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i'
13474
13476
  }))
13475
13477
 
@@ -15357,6 +15359,7 @@
15357
15359
  var SymbolWrapper = function Symbol () {
15358
15360
  var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0])
15359
15361
  var result = isPrototypeOf(SymbolPrototype, this)
15362
+ // eslint-disable-next-line sonar/inconsistent-function-call -- ok
15360
15363
  ? new NativeSymbol(description)
15361
15364
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
15362
15365
  : description === undefined ? NativeSymbol() : NativeSymbol(description)
@@ -17824,9 +17827,11 @@
17824
17827
  'use strict'
17825
17828
  // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
17826
17829
  require('../modules/es.array.iterator')
17830
+ require('../modules/es.string.from-code-point')
17827
17831
  var $ = require('../internals/export')
17828
17832
  var globalThis = require('../internals/global-this')
17829
17833
  var safeGetBuiltIn = require('../internals/safe-get-built-in')
17834
+ var getBuiltIn = require('../internals/get-built-in')
17830
17835
  var call = require('../internals/function-call')
17831
17836
  var uncurryThis = require('../internals/function-uncurry-this')
17832
17837
  var DESCRIPTORS = require('../internals/descriptors')
@@ -17866,10 +17871,11 @@
17866
17871
  var Headers = safeGetBuiltIn('Headers')
17867
17872
  var RequestPrototype = NativeRequest && NativeRequest.prototype
17868
17873
  var HeadersPrototype = Headers && Headers.prototype
17869
- var RegExp = globalThis.RegExp
17870
17874
  var TypeError = globalThis.TypeError
17871
- var decodeURIComponent = globalThis.decodeURIComponent
17872
17875
  var encodeURIComponent = globalThis.encodeURIComponent
17876
+ var fromCharCode = String.fromCharCode
17877
+ var fromCodePoint = getBuiltIn('String', 'fromCodePoint')
17878
+ var $parseInt = parseInt
17873
17879
  var charAt = uncurryThis(''.charAt)
17874
17880
  var join = uncurryThis([].join)
17875
17881
  var push = uncurryThis([].push)
@@ -17878,33 +17884,125 @@
17878
17884
  var splice = uncurryThis([].splice)
17879
17885
  var split = uncurryThis(''.split)
17880
17886
  var stringSlice = uncurryThis(''.slice)
17887
+ var exec = uncurryThis(/./.exec)
17881
17888
 
17882
17889
  var plus = /\+/g
17883
- var sequences = Array(4)
17890
+ var FALLBACK_REPLACER = '\uFFFD'
17891
+ var VALID_HEX = /^[0-9a-f]+$/i
17892
+
17893
+ var parseHexOctet = function (string, start) {
17894
+ var substr = stringSlice(string, start, start + 2)
17895
+ if (!exec(VALID_HEX, substr)) return NaN
17884
17896
 
17885
- var percentSequence = function (bytes) {
17886
- return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'))
17897
+ return $parseInt(substr, 16)
17887
17898
  }
17888
17899
 
17889
- var percentDecode = function (sequence) {
17890
- try {
17891
- return decodeURIComponent(sequence)
17892
- } catch (error) {
17893
- return sequence
17900
+ var getLeadingOnes = function (octet) {
17901
+ var count = 0
17902
+ for (var mask = 0x80; mask > 0 && (octet & mask) !== 0; mask >>= 1) {
17903
+ count++
17894
17904
  }
17905
+ return count
17895
17906
  }
17896
17907
 
17897
- var deserialize = function (it) {
17898
- var result = replace(it, plus, ' ')
17899
- var bytes = 4
17900
- try {
17901
- return decodeURIComponent(result)
17902
- } catch (error) {
17903
- while (bytes) {
17904
- result = replace(result, percentSequence(bytes--), percentDecode)
17908
+ var utf8Decode = function (octets) {
17909
+ var codePoint = null
17910
+
17911
+ switch (octets.length) {
17912
+ case 1:
17913
+ codePoint = octets[0]
17914
+ break
17915
+ case 2:
17916
+ codePoint = (octets[0] & 0x1F) << 6 | (octets[1] & 0x3F)
17917
+ break
17918
+ case 3:
17919
+ codePoint = (octets[0] & 0x0F) << 12 | (octets[1] & 0x3F) << 6 | (octets[2] & 0x3F)
17920
+ break
17921
+ case 4:
17922
+ codePoint = (octets[0] & 0x07) << 18 | (octets[1] & 0x3F) << 12 | (octets[2] & 0x3F) << 6 | (octets[3] & 0x3F)
17923
+ break
17924
+ }
17925
+
17926
+ return codePoint > 0x10FFFF ? null : codePoint
17927
+ }
17928
+
17929
+ var decode = function (input) {
17930
+ input = replace(input, plus, ' ')
17931
+ var length = input.length
17932
+ var result = ''
17933
+ var i = 0
17934
+
17935
+ while (i < length) {
17936
+ var decodedChar = charAt(input, i)
17937
+
17938
+ if (decodedChar === '%') {
17939
+ if (charAt(input, i + 1) === '%' || i + 3 > length) {
17940
+ result += '%'
17941
+ i++
17942
+ continue
17943
+ }
17944
+
17945
+ var octet = parseHexOctet(input, i + 1)
17946
+
17947
+ // eslint-disable-next-line no-self-compare -- NaN check
17948
+ if (octet !== octet) {
17949
+ result += decodedChar
17950
+ i++
17951
+ continue
17952
+ }
17953
+
17954
+ i += 2
17955
+ var byteSequenceLength = getLeadingOnes(octet)
17956
+
17957
+ if (byteSequenceLength === 0) {
17958
+ decodedChar = fromCharCode(octet)
17959
+ } else {
17960
+ if (byteSequenceLength === 1 || byteSequenceLength > 4) {
17961
+ result += FALLBACK_REPLACER
17962
+ i++
17963
+ continue
17964
+ }
17965
+
17966
+ var octets = [octet]
17967
+ var sequenceIndex = 1
17968
+
17969
+ while (sequenceIndex < byteSequenceLength) {
17970
+ i++
17971
+ if (i + 3 > length || charAt(input, i) !== '%') break
17972
+
17973
+ var nextByte = parseHexOctet(input, i + 1)
17974
+
17975
+ // eslint-disable-next-line no-self-compare -- NaN check
17976
+ if (nextByte !== nextByte) {
17977
+ i += 3
17978
+ break
17979
+ }
17980
+ if (nextByte > 191 || nextByte < 128) break
17981
+
17982
+ push(octets, nextByte)
17983
+ i += 2
17984
+ sequenceIndex++
17985
+ }
17986
+
17987
+ if (octets.length !== byteSequenceLength) {
17988
+ result += FALLBACK_REPLACER
17989
+ continue
17990
+ }
17991
+
17992
+ var codePoint = utf8Decode(octets)
17993
+ if (codePoint === null) {
17994
+ result += FALLBACK_REPLACER
17995
+ } else {
17996
+ decodedChar = fromCodePoint(codePoint)
17997
+ }
17998
+ }
17905
17999
  }
17906
- return result
18000
+
18001
+ result += decodedChar
18002
+ i++
17907
18003
  }
18004
+
18005
+ return result
17908
18006
  }
17909
18007
 
17910
18008
  var find = /[!'()~]|%20/g
@@ -17938,7 +18036,7 @@
17938
18036
  var target = state.target
17939
18037
  var index = state.index++
17940
18038
  if (!target || index >= target.length) {
17941
- state.target = undefined
18039
+ state.target = null
17942
18040
  return createIterResultObject(undefined, true)
17943
18041
  }
17944
18042
  var entry = target[index]
@@ -18001,8 +18099,8 @@
18001
18099
  if (attribute.length) {
18002
18100
  entry = split(attribute, '=')
18003
18101
  push(entries, {
18004
- key: deserialize(shift(entry)),
18005
- value: deserialize(join(entry, '='))
18102
+ key: decode(shift(entry)),
18103
+ value: decode(join(entry, '='))
18006
18104
  })
18007
18105
  }
18008
18106
  }
@@ -18243,7 +18341,7 @@
18243
18341
  URLSearchParams: URLSearchParamsConstructor,
18244
18342
  getState: getInternalParamsState
18245
18343
  }
18246
- }, { '../internals/an-instance': 29, '../internals/an-object': 30, '../internals/array-sort': 53, '../internals/classof': 66, '../internals/create-iter-result-object': 74, '../internals/create-property-descriptor': 76, '../internals/define-built-in': 81, '../internals/define-built-in-accessor': 80, '../internals/define-built-ins': 82, '../internals/descriptors': 85, '../internals/export': 107, '../internals/function-bind-context': 113, '../internals/function-call': 116, '../internals/function-uncurry-this': 120, '../internals/get-iterator': 126, '../internals/get-iterator-method': 125, '../internals/global-this': 131, '../internals/has-own-property': 132, '../internals/internal-state': 143, '../internals/is-callable': 147, '../internals/is-object': 153, '../internals/iterator-create-constructor': 161, '../internals/object-create': 185, '../internals/safe-get-built-in': 220, '../internals/set-to-string-tag': 235, '../internals/to-string': 269, '../internals/url-constructor-detection': 278, '../internals/validate-arguments-length': 281, '../internals/well-known-symbol': 285, '../modules/es.array.iterator': 314 }],
18344
+ }, { '../internals/an-instance': 29, '../internals/an-object': 30, '../internals/array-sort': 53, '../internals/classof': 66, '../internals/create-iter-result-object': 74, '../internals/create-property-descriptor': 76, '../internals/define-built-in': 81, '../internals/define-built-in-accessor': 80, '../internals/define-built-ins': 82, '../internals/descriptors': 85, '../internals/export': 107, '../internals/function-bind-context': 113, '../internals/function-call': 116, '../internals/function-uncurry-this': 120, '../internals/get-built-in': 123, '../internals/get-iterator': 126, '../internals/get-iterator-method': 125, '../internals/global-this': 131, '../internals/has-own-property': 132, '../internals/internal-state': 143, '../internals/is-callable': 147, '../internals/is-object': 153, '../internals/iterator-create-constructor': 161, '../internals/object-create': 185, '../internals/safe-get-built-in': 220, '../internals/set-to-string-tag': 235, '../internals/to-string': 269, '../internals/url-constructor-detection': 278, '../internals/validate-arguments-length': 281, '../internals/well-known-symbol': 285, '../modules/es.array.iterator': 314, '../modules/es.string.from-code-point': 470 }],
18247
18345
  583: [function (require, module, exports) {
18248
18346
  'use strict'
18249
18347
  var defineBuiltIn = require('../internals/define-built-in')