perlica
Version:
<h1 align="center">Perlica</h1>
87 lines (83 loc) • 3.04 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/Predicate/Array.ts
var Array_exports = {};
__export(Array_exports, {
isArray: () => isArray2,
isBigInt64Array: () => isBigInt64Array,
isBigUint64Array: () => isBigUint64Array,
isEmpty: () => isEmpty,
isFloat32Array: () => isFloat32Array,
isFloat64Array: () => isFloat64Array,
isInt16Array: () => isInt16Array,
isInt32Array: () => isInt32Array,
isInt8Array: () => isInt8Array,
isNonEmpty: () => isNonEmpty,
isTypedArray: () => isTypedArray,
isUint16Array: () => isUint16Array,
isUint32Array: () => isUint32Array,
isUint8Array: () => isUint8Array,
isUint8ClampedArray: () => isUint8ClampedArray,
len: () => len,
maxLen: () => maxLen,
minLen: () => minLen
});
module.exports = __toCommonJS(Array_exports);
// src/Predicate/index.ts
var isArray = (value) => Array.isArray(value);
// src/Predicate/Array.ts
var maxLen = (count) => (value) => value.length <= count;
var minLen = (count) => (value) => value.length >= count;
var len = (count) => (value) => value.length === count;
var isArray2 = isArray;
var isEmpty = (self) => self.length === 0;
var isNonEmpty = (self) => self.length !== 0;
var isTypedArray = (value) => ArrayBuffer.isView(value);
var isInt8Array = (value) => value instanceof Int8Array;
var isUint8Array = (value) => value instanceof Uint8Array;
var isUint8ClampedArray = (value) => value instanceof Uint8ClampedArray;
var isInt16Array = (value) => value instanceof Int16Array;
var isUint16Array = (value) => value instanceof Uint16Array;
var isInt32Array = (value) => value instanceof Int32Array;
var isUint32Array = (value) => value instanceof Uint32Array;
var isFloat32Array = (value) => value instanceof Float32Array;
var isFloat64Array = (value) => value instanceof Float64Array;
var isBigInt64Array = (value) => value instanceof BigInt64Array;
var isBigUint64Array = (value) => value instanceof BigUint64Array;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isArray,
isBigInt64Array,
isBigUint64Array,
isEmpty,
isFloat32Array,
isFloat64Array,
isInt16Array,
isInt32Array,
isInt8Array,
isNonEmpty,
isTypedArray,
isUint16Array,
isUint32Array,
isUint8Array,
isUint8ClampedArray,
len,
maxLen,
minLen
});