@dataui/crud-util
Advanced tools
Comparing version 5.3.0 to 5.3.1-alpha.0
@@ -9,3 +9,3 @@ "use strict"; | ||
exports.isNull = isNull; | ||
const isNil = (val) => exports.isUndefined(val) || exports.isNull(val); | ||
const isNil = (val) => (0, exports.isUndefined)(val) || (0, exports.isNull)(val); | ||
exports.isNil = isNil; | ||
@@ -16,11 +16,11 @@ const isString = (val) => typeof val === 'string'; | ||
exports.hasLength = hasLength; | ||
const isStringFull = (val) => exports.isString(val) && exports.hasLength(val); | ||
const isStringFull = (val) => (0, exports.isString)(val) && (0, exports.hasLength)(val); | ||
exports.isStringFull = isStringFull; | ||
const isArrayFull = (val) => Array.isArray(val) && exports.hasLength(val); | ||
const isArrayFull = (val) => Array.isArray(val) && (0, exports.hasLength)(val); | ||
exports.isArrayFull = isArrayFull; | ||
const isArrayStrings = (val) => exports.isArrayFull(val) && val.every((v) => exports.isStringFull(v)); | ||
const isArrayStrings = (val) => (0, exports.isArrayFull)(val) && val.every((v) => (0, exports.isStringFull)(v)); | ||
exports.isArrayStrings = isArrayStrings; | ||
const isObject = (val) => typeof val === 'object' && !exports.isNull(val); | ||
const isObject = (val) => typeof val === 'object' && !(0, exports.isNull)(val); | ||
exports.isObject = isObject; | ||
const isObjectFull = (val) => exports.isObject(val) && exports.hasLength(obj_util_1.objKeys(val)); | ||
const isObjectFull = (val) => (0, exports.isObject)(val) && (0, exports.hasLength)((0, obj_util_1.objKeys)(val)); | ||
exports.isObjectFull = isObjectFull; | ||
@@ -35,3 +35,3 @@ const isNumber = (val) => typeof val === 'number' && !Number.isNaN(val) && Number.isFinite(val); | ||
exports.isTrue = isTrue; | ||
const isIn = (val, arr = []) => arr.some((o) => exports.isEqual(val, o)); | ||
const isIn = (val, arr = []) => arr.some((o) => (0, exports.isEqual)(val, o)); | ||
exports.isIn = isIn; | ||
@@ -42,3 +42,3 @@ const isBoolean = (val) => typeof val === 'boolean'; | ||
exports.isNumeric = isNumeric; | ||
const isDateString = (val) => exports.isStringFull(val) && | ||
const isDateString = (val) => (0, exports.isStringFull)(val) && | ||
/^\d{4}-[01]\d-[0-3]\d(?:T[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[-+][0-2]\d(?::?[0-5]\d)?)?)?$/g.test(val); | ||
@@ -48,5 +48,5 @@ exports.isDateString = isDateString; | ||
exports.isDate = isDate; | ||
const isValue = (val) => exports.isStringFull(val) || exports.isNumber(val) || exports.isBoolean(val) || exports.isDate(val); | ||
const isValue = (val) => (0, exports.isStringFull)(val) || (0, exports.isNumber)(val) || (0, exports.isBoolean)(val) || (0, exports.isDate)(val); | ||
exports.isValue = isValue; | ||
const hasValue = (val) => exports.isArrayFull(val) ? val.every((o) => exports.isValue(o)) : exports.isValue(val); | ||
const hasValue = (val) => (0, exports.isArrayFull)(val) ? val.every((o) => (0, exports.isValue)(o)) : (0, exports.isValue)(val); | ||
exports.hasValue = hasValue; | ||
@@ -53,0 +53,0 @@ const isFunction = (val) => typeof val === 'function'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -1,3 +0,3 @@ | ||
export declare type ClassType<T> = { | ||
export type ClassType<T> = { | ||
new (...args: any[]): T; | ||
}; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -1,3 +0,3 @@ | ||
export declare type ObjectLiteral = { | ||
export type ObjectLiteral = { | ||
[key: string]: any; | ||
}; |
{ | ||
"name": "@dataui/crud-util", | ||
"description": "NestJs CRUD for RESTful APIs - util", | ||
"version": "5.3.0", | ||
"version": "5.3.1-alpha.0", | ||
"license": "MIT", | ||
@@ -40,3 +40,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "1f5899feaecace00b8e5b19fc612eac49b3cff39" | ||
"gitHead": "fa6f209fb223752becce404ec6088fafcd08c8a4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
19648
133
2