@codeparticle/formal
Version:
A <2kb library for validating data of any kind
19 lines (14 loc) • 602 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});
var _chunkYSLAWOV5js = require('./chunk-YSLAWOV5.js');
// src/rules/is-non-empty-array.ts
var isNonEmptyArray = _chunkYSLAWOV5js.createRule.call(void 0, {
condition: (arr) => Array.isArray(arr) && arr.length > 0,
message: (val) => Array.isArray(val) ? `Array must not be empty` : `No array values found in ${val}`
});
exports.isNonEmptyArray = isNonEmptyArray;
/**
* @file Check if an array is actually an array, and also not empty.
* @author Nick Krause
* @license MIT
*/
//# sourceMappingURL=chunk-WBEDGWGM.js.map