lib0 0.2.46 → 0.2.47

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.
package/dist/test.js CHANGED
@@ -862,6 +862,8 @@
862
862
  */
863
863
  const flatten = arr => arr.reduce((acc, val) => acc.concat(val), []);
864
864
 
865
+ const isArray = Array.isArray;
866
+
865
867
  /**
866
868
  * Utility functions for working with EcmaScript objects.
867
869
  *
@@ -4304,10 +4306,23 @@
4304
4306
  compareArrays(flatten(arr), [1, 2, 3, 4]);
4305
4307
  };
4306
4308
 
4309
+ /**
4310
+ * @param {t.TestCase} tc
4311
+ */
4312
+ const testIsArray = tc => {
4313
+ assert(isArray([]));
4314
+ assert(isArray([1]));
4315
+ assert(isArray(Array.from(new Set([3]))));
4316
+ assert(!isArray(1));
4317
+ assert(!isArray(0));
4318
+ assert(!isArray(''));
4319
+ };
4320
+
4307
4321
  var array = /*#__PURE__*/Object.freeze({
4308
4322
  __proto__: null,
4309
4323
  testAppend: testAppend,
4310
- testflatten: testflatten
4324
+ testflatten: testflatten,
4325
+ testIsArray: testIsArray
4311
4326
  });
4312
4327
 
4313
4328
  const testLogging = () => {