@mll-lab/js-utils 2.2.0 → 2.3.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.
package/dist/index.js CHANGED
@@ -9432,6 +9432,9 @@ if(freeModule){// Export for Node.js.
9432
9432
  freeExports._=_;}else {// Export to the global object.
9433
9433
  root._=_;}}).call(commonjsGlobal);});
9434
9434
 
9435
+ function isNonEmptyArray(value) {
9436
+ return value.length > 0;
9437
+ }
9435
9438
  /**
9436
9439
  * Return a new array that does not contain the item at the specified index.
9437
9440
  */
@@ -9459,6 +9462,10 @@ Object.freeze(EMPTY_ARRAY);
9459
9462
  function insertIf(condition, ...elements) {
9460
9463
  return condition ? elements : [];
9461
9464
  }
9465
+ function last(array) {
9466
+ // @ts-expect-error too magical
9467
+ return array[array.length - 1];
9468
+ }
9462
9469
 
9463
9470
  function toInteger(dirtyNumber) {
9464
9471
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
@@ -15177,12 +15184,14 @@ exports.isBSNR = isBSNR;
15177
15184
  exports.isEmail = isEmail;
15178
15185
  exports.isFuture = isFuture;
15179
15186
  exports.isLabId = isLabId;
15187
+ exports.isNonEmptyArray = isNonEmptyArray;
15180
15188
  exports.isOnlyDigits = isOnlyDigits;
15181
15189
  exports.isRackBarcode = isRackBarcode;
15182
15190
  exports.isString = isString;
15183
15191
  exports.isToday = isToday;
15184
15192
  exports.isURL = isURL;
15185
15193
  exports.isWord = isWord;
15194
+ exports.last = last;
15186
15195
  exports.parseDate = parseDate;
15187
15196
  exports.parseDotlessDate = parseDotlessDate;
15188
15197
  exports.parseGermanDate = parseGermanDate;