@guardian/feast-multiplatform-library 2.0.0 → 3.0.1

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.
@@ -48,6 +48,12 @@ if (typeof Math.clz32 === 'undefined') {
48
48
  };
49
49
  }(Math.log, Math.LN2);
50
50
  }
51
+ if (typeof String.prototype.startsWith === 'undefined') {
52
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
53
+ position = position || 0;
54
+ return this.lastIndexOf(searchString, position) === position;
55
+ }});
56
+ }
51
57
  if (typeof String.prototype.endsWith === 'undefined') {
52
58
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
53
59
  var subjectString = this.toString();
@@ -59,12 +65,6 @@ if (typeof String.prototype.endsWith === 'undefined') {
59
65
  return lastIndex !== -1 && lastIndex === position;
60
66
  }});
61
67
  }
62
- if (typeof String.prototype.startsWith === 'undefined') {
63
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
64
- position = position || 0;
65
- return this.lastIndexOf(searchString, position) === position;
66
- }});
67
- }
68
68
  //endregion
69
69
  (function (_) {
70
70
  'use strict';
@@ -340,6 +340,9 @@ if (typeof String.prototype.startsWith === 'undefined') {
340
340
  return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length)));
341
341
  }
342
342
  }
343
+ function filterNotNull(_this__u8e3s4) {
344
+ return filterNotNullTo(_this__u8e3s4, ArrayList_init_$Create$());
345
+ }
343
346
  function get_lastIndex(_this__u8e3s4) {
344
347
  return _this__u8e3s4.length - 1 | 0;
345
348
  }
@@ -359,6 +362,18 @@ if (typeof String.prototype.startsWith === 'undefined') {
359
362
  }
360
363
  return destination;
361
364
  }
365
+ function filterNotNullTo(_this__u8e3s4, destination) {
366
+ var inductionVariable = 0;
367
+ var last = _this__u8e3s4.length;
368
+ while (inductionVariable < last) {
369
+ var element = _this__u8e3s4[inductionVariable];
370
+ inductionVariable = inductionVariable + 1 | 0;
371
+ if (!(element == null)) {
372
+ destination.f(element);
373
+ }
374
+ }
375
+ return destination;
376
+ }
362
377
  function indexOf(_this__u8e3s4, element) {
363
378
  if (element == null) {
364
379
  var inductionVariable = 0;
@@ -6315,6 +6330,9 @@ if (typeof String.prototype.startsWith === 'undefined') {
6315
6330
  function emptyList() {
6316
6331
  return EmptyList_getInstance();
6317
6332
  }
6333
+ function listOfNotNull(elements) {
6334
+ return filterNotNull(elements);
6335
+ }
6318
6336
  function EmptyList() {
6319
6337
  EmptyList_instance = this;
6320
6338
  this.ob_1 = new Long(-1478467534, -1720727600);
@@ -10815,149 +10833,150 @@ if (typeof String.prototype.startsWith === 'undefined') {
10815
10833
  _.$_$.u4 = get_lastIndex_2;
10816
10834
  _.$_$.v4 = lastOrNull;
10817
10835
  _.$_$.w4 = last;
10818
- _.$_$.x4 = mapOf_0;
10819
- _.$_$.y4 = plus;
10820
- _.$_$.z4 = removeLast;
10821
- _.$_$.a5 = setOf_0;
10822
- _.$_$.b5 = singleOrNull;
10823
- _.$_$.c5 = toBooleanArray;
10824
- _.$_$.d5 = toHashSet;
10825
- _.$_$.e5 = toList_0;
10826
- _.$_$.f5 = toList;
10827
- _.$_$.g5 = toMap;
10828
- _.$_$.h5 = withIndex;
10829
- _.$_$.i5 = get_COROUTINE_SUSPENDED;
10830
- _.$_$.j5 = CoroutineImpl;
10831
- _.$_$.k5 = enumEntries;
10832
- _.$_$.l5 = print;
10833
- _.$_$.m5 = add;
10834
- _.$_$.n5 = bitwiseOr;
10835
- _.$_$.o5 = compare;
10836
- _.$_$.p5 = convertToByte;
10837
- _.$_$.q5 = convertToInt;
10838
- _.$_$.r5 = convertToShort;
10839
- _.$_$.s5 = equalsLong;
10840
- _.$_$.t5 = fromInt;
10841
- _.$_$.u5 = invert;
10842
- _.$_$.v5 = multiply;
10843
- _.$_$.w5 = negate;
10844
- _.$_$.x5 = numberToLong;
10845
- _.$_$.y5 = shiftLeft;
10846
- _.$_$.z5 = subtract;
10847
- _.$_$.a6 = toNumber;
10848
- _.$_$.b6 = arrayIterator;
10849
- _.$_$.c6 = booleanArray;
10850
- _.$_$.d6 = captureStack;
10851
- _.$_$.e6 = charArray;
10852
- _.$_$.f6 = charCodeAt;
10853
- _.$_$.g6 = charSequenceGet;
10854
- _.$_$.h6 = charSequenceLength;
10855
- _.$_$.i6 = charSequenceSubSequence;
10856
- _.$_$.j6 = equals;
10857
- _.$_$.k6 = getBooleanHashCode;
10858
- _.$_$.l6 = getNumberHashCode;
10859
- _.$_$.m6 = getPropertyCallableRef;
10860
- _.$_$.n6 = getStringHashCode;
10861
- _.$_$.o6 = hashCode_0;
10862
- _.$_$.p6 = initMetadataForClass;
10863
- _.$_$.q6 = initMetadataForCompanion;
10864
- _.$_$.r6 = initMetadataForCoroutine;
10865
- _.$_$.s6 = initMetadataForInterface;
10866
- _.$_$.t6 = initMetadataForLambda;
10867
- _.$_$.u6 = initMetadataForObject;
10868
- _.$_$.v6 = isArray;
10869
- _.$_$.w6 = isBooleanArray;
10870
- _.$_$.x6 = isByteArray;
10871
- _.$_$.y6 = isCharArray;
10872
- _.$_$.z6 = isDoubleArray;
10873
- _.$_$.a7 = isFloatArray;
10874
- _.$_$.b7 = isIntArray;
10875
- _.$_$.c7 = isInterface;
10876
- _.$_$.d7 = isLongArray;
10877
- _.$_$.e7 = isShortArray;
10878
- _.$_$.f7 = get_js;
10879
- _.$_$.g7 = longArray;
10880
- _.$_$.h7 = numberRangeToNumber;
10881
- _.$_$.i7 = numberToChar;
10882
- _.$_$.j7 = numberToInt;
10883
- _.$_$.k7 = objectCreate;
10884
- _.$_$.l7 = protoOf;
10885
- _.$_$.m7 = toByte;
10886
- _.$_$.n7 = toString_1;
10887
- _.$_$.o7 = round;
10888
- _.$_$.p7 = ClosedRange;
10889
- _.$_$.q7 = coerceAtLeast;
10890
- _.$_$.r7 = coerceAtMost;
10891
- _.$_$.s7 = contains_0;
10892
- _.$_$.t7 = step;
10893
- _.$_$.u7 = until;
10894
- _.$_$.v7 = createKType;
10895
- _.$_$.w7 = getKClassFromExpression;
10896
- _.$_$.x7 = getKClass;
10897
- _.$_$.y7 = KClass;
10898
- _.$_$.z7 = KProperty1;
10899
- _.$_$.a8 = KTypeParameter;
10900
- _.$_$.b8 = contains_2;
10901
- _.$_$.c8 = equals_0;
10902
- _.$_$.d8 = indexOf_1;
10903
- _.$_$.e8 = indexOf_0;
10904
- _.$_$.f8 = isBlank;
10905
- _.$_$.g8 = lastIndexOf;
10906
- _.$_$.h8 = removeSuffix;
10907
- _.$_$.i8 = single_0;
10908
- _.$_$.j8 = startsWith;
10909
- _.$_$.k8 = substringAfter;
10910
- _.$_$.l8 = substringBefore;
10911
- _.$_$.m8 = substring_0;
10912
- _.$_$.n8 = substring;
10913
- _.$_$.o8 = toBooleanStrictOrNull;
10914
- _.$_$.p8 = toDoubleOrNull;
10915
- _.$_$.q8 = toDouble;
10916
- _.$_$.r8 = toIntOrNull;
10917
- _.$_$.s8 = toInt;
10918
- _.$_$.t8 = toLongOrNull;
10919
- _.$_$.u8 = toUByte;
10920
- _.$_$.v8 = toUInt;
10921
- _.$_$.w8 = toULongOrNull;
10922
- _.$_$.x8 = toULong;
10923
- _.$_$.y8 = toUShort;
10924
- _.$_$.z8 = trimIndent;
10925
- _.$_$.a9 = Duration;
10926
- _.$_$.b9 = Instant;
10927
- _.$_$.c9 = Uuid;
10928
- _.$_$.d9 = Char;
10929
- _.$_$.e9 = DeepRecursiveFunction;
10930
- _.$_$.f9 = DeepRecursiveScope;
10931
- _.$_$.g9 = Enum;
10932
- _.$_$.h9 = Exception;
10933
- _.$_$.i9 = IllegalArgumentException;
10934
- _.$_$.j9 = Long;
10935
- _.$_$.k9 = Pair;
10936
- _.$_$.l9 = Result;
10937
- _.$_$.m9 = THROW_CCE;
10938
- _.$_$.n9 = Triple;
10939
- _.$_$.o9 = UByteArray;
10940
- _.$_$.p9 = UByte;
10941
- _.$_$.q9 = UIntArray;
10942
- _.$_$.r9 = UInt;
10943
- _.$_$.s9 = ULongArray;
10944
- _.$_$.t9 = ULong;
10945
- _.$_$.u9 = UShortArray;
10946
- _.$_$.v9 = UShort;
10947
- _.$_$.w9 = Unit;
10948
- _.$_$.x9 = arrayOf;
10949
- _.$_$.y9 = countTrailingZeroBits;
10950
- _.$_$.z9 = createFailure;
10951
- _.$_$.aa = ensureNotNull;
10952
- _.$_$.ba = invoke;
10953
- _.$_$.ca = isFinite_0;
10954
- _.$_$.da = isFinite;
10955
- _.$_$.ea = lazy;
10956
- _.$_$.fa = lazy_0;
10957
- _.$_$.ga = noWhenBranchMatchedException;
10958
- _.$_$.ha = plus_0;
10959
- _.$_$.ia = toString_0;
10960
- _.$_$.ja = to;
10836
+ _.$_$.x4 = listOfNotNull;
10837
+ _.$_$.y4 = mapOf_0;
10838
+ _.$_$.z4 = plus;
10839
+ _.$_$.a5 = removeLast;
10840
+ _.$_$.b5 = setOf_0;
10841
+ _.$_$.c5 = singleOrNull;
10842
+ _.$_$.d5 = toBooleanArray;
10843
+ _.$_$.e5 = toHashSet;
10844
+ _.$_$.f5 = toList_0;
10845
+ _.$_$.g5 = toList;
10846
+ _.$_$.h5 = toMap;
10847
+ _.$_$.i5 = withIndex;
10848
+ _.$_$.j5 = get_COROUTINE_SUSPENDED;
10849
+ _.$_$.k5 = CoroutineImpl;
10850
+ _.$_$.l5 = enumEntries;
10851
+ _.$_$.m5 = print;
10852
+ _.$_$.n5 = add;
10853
+ _.$_$.o5 = bitwiseOr;
10854
+ _.$_$.p5 = compare;
10855
+ _.$_$.q5 = convertToByte;
10856
+ _.$_$.r5 = convertToInt;
10857
+ _.$_$.s5 = convertToShort;
10858
+ _.$_$.t5 = equalsLong;
10859
+ _.$_$.u5 = fromInt;
10860
+ _.$_$.v5 = invert;
10861
+ _.$_$.w5 = multiply;
10862
+ _.$_$.x5 = negate;
10863
+ _.$_$.y5 = numberToLong;
10864
+ _.$_$.z5 = shiftLeft;
10865
+ _.$_$.a6 = subtract;
10866
+ _.$_$.b6 = toNumber;
10867
+ _.$_$.c6 = arrayIterator;
10868
+ _.$_$.d6 = booleanArray;
10869
+ _.$_$.e6 = captureStack;
10870
+ _.$_$.f6 = charArray;
10871
+ _.$_$.g6 = charCodeAt;
10872
+ _.$_$.h6 = charSequenceGet;
10873
+ _.$_$.i6 = charSequenceLength;
10874
+ _.$_$.j6 = charSequenceSubSequence;
10875
+ _.$_$.k6 = equals;
10876
+ _.$_$.l6 = getBooleanHashCode;
10877
+ _.$_$.m6 = getNumberHashCode;
10878
+ _.$_$.n6 = getPropertyCallableRef;
10879
+ _.$_$.o6 = getStringHashCode;
10880
+ _.$_$.p6 = hashCode_0;
10881
+ _.$_$.q6 = initMetadataForClass;
10882
+ _.$_$.r6 = initMetadataForCompanion;
10883
+ _.$_$.s6 = initMetadataForCoroutine;
10884
+ _.$_$.t6 = initMetadataForInterface;
10885
+ _.$_$.u6 = initMetadataForLambda;
10886
+ _.$_$.v6 = initMetadataForObject;
10887
+ _.$_$.w6 = isArray;
10888
+ _.$_$.x6 = isBooleanArray;
10889
+ _.$_$.y6 = isByteArray;
10890
+ _.$_$.z6 = isCharArray;
10891
+ _.$_$.a7 = isDoubleArray;
10892
+ _.$_$.b7 = isFloatArray;
10893
+ _.$_$.c7 = isIntArray;
10894
+ _.$_$.d7 = isInterface;
10895
+ _.$_$.e7 = isLongArray;
10896
+ _.$_$.f7 = isShortArray;
10897
+ _.$_$.g7 = get_js;
10898
+ _.$_$.h7 = longArray;
10899
+ _.$_$.i7 = numberRangeToNumber;
10900
+ _.$_$.j7 = numberToChar;
10901
+ _.$_$.k7 = numberToInt;
10902
+ _.$_$.l7 = objectCreate;
10903
+ _.$_$.m7 = protoOf;
10904
+ _.$_$.n7 = toByte;
10905
+ _.$_$.o7 = toString_1;
10906
+ _.$_$.p7 = round;
10907
+ _.$_$.q7 = ClosedRange;
10908
+ _.$_$.r7 = coerceAtLeast;
10909
+ _.$_$.s7 = coerceAtMost;
10910
+ _.$_$.t7 = contains_0;
10911
+ _.$_$.u7 = step;
10912
+ _.$_$.v7 = until;
10913
+ _.$_$.w7 = createKType;
10914
+ _.$_$.x7 = getKClassFromExpression;
10915
+ _.$_$.y7 = getKClass;
10916
+ _.$_$.z7 = KClass;
10917
+ _.$_$.a8 = KProperty1;
10918
+ _.$_$.b8 = KTypeParameter;
10919
+ _.$_$.c8 = contains_2;
10920
+ _.$_$.d8 = equals_0;
10921
+ _.$_$.e8 = indexOf_1;
10922
+ _.$_$.f8 = indexOf_0;
10923
+ _.$_$.g8 = isBlank;
10924
+ _.$_$.h8 = lastIndexOf;
10925
+ _.$_$.i8 = removeSuffix;
10926
+ _.$_$.j8 = single_0;
10927
+ _.$_$.k8 = startsWith;
10928
+ _.$_$.l8 = substringAfter;
10929
+ _.$_$.m8 = substringBefore;
10930
+ _.$_$.n8 = substring_0;
10931
+ _.$_$.o8 = substring;
10932
+ _.$_$.p8 = toBooleanStrictOrNull;
10933
+ _.$_$.q8 = toDoubleOrNull;
10934
+ _.$_$.r8 = toDouble;
10935
+ _.$_$.s8 = toIntOrNull;
10936
+ _.$_$.t8 = toInt;
10937
+ _.$_$.u8 = toLongOrNull;
10938
+ _.$_$.v8 = toUByte;
10939
+ _.$_$.w8 = toUInt;
10940
+ _.$_$.x8 = toULongOrNull;
10941
+ _.$_$.y8 = toULong;
10942
+ _.$_$.z8 = toUShort;
10943
+ _.$_$.a9 = trimIndent;
10944
+ _.$_$.b9 = Duration;
10945
+ _.$_$.c9 = Instant;
10946
+ _.$_$.d9 = Uuid;
10947
+ _.$_$.e9 = Char;
10948
+ _.$_$.f9 = DeepRecursiveFunction;
10949
+ _.$_$.g9 = DeepRecursiveScope;
10950
+ _.$_$.h9 = Enum;
10951
+ _.$_$.i9 = Exception;
10952
+ _.$_$.j9 = IllegalArgumentException;
10953
+ _.$_$.k9 = Long;
10954
+ _.$_$.l9 = Pair;
10955
+ _.$_$.m9 = Result;
10956
+ _.$_$.n9 = THROW_CCE;
10957
+ _.$_$.o9 = Triple;
10958
+ _.$_$.p9 = UByteArray;
10959
+ _.$_$.q9 = UByte;
10960
+ _.$_$.r9 = UIntArray;
10961
+ _.$_$.s9 = UInt;
10962
+ _.$_$.t9 = ULongArray;
10963
+ _.$_$.u9 = ULong;
10964
+ _.$_$.v9 = UShortArray;
10965
+ _.$_$.w9 = UShort;
10966
+ _.$_$.x9 = Unit;
10967
+ _.$_$.y9 = arrayOf;
10968
+ _.$_$.z9 = countTrailingZeroBits;
10969
+ _.$_$.aa = createFailure;
10970
+ _.$_$.ba = ensureNotNull;
10971
+ _.$_$.ca = invoke;
10972
+ _.$_$.da = isFinite_0;
10973
+ _.$_$.ea = isFinite;
10974
+ _.$_$.fa = lazy;
10975
+ _.$_$.ga = lazy_0;
10976
+ _.$_$.ha = noWhenBranchMatchedException;
10977
+ _.$_$.ia = plus_0;
10978
+ _.$_$.ja = toString_0;
10979
+ _.$_$.ka = to;
10961
10980
  //endregion
10962
10981
  return _;
10963
10982
  }(module.exports));