@xylabs/promise
Advanced tools
Comparing version 3.6.7 to 3.6.8
@@ -39,5 +39,5 @@ { | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^3.15.4", | ||
"@xylabs/tsconfig": "^3.15.4", | ||
"@xylabs/tsconfig-jest": "^3.15.4", | ||
"@xylabs/ts-scripts-yarn3": "^3.15.5", | ||
"@xylabs/tsconfig": "^3.15.5", | ||
"@xylabs/tsconfig-jest": "^3.15.5", | ||
"typescript": "^5.5.4" | ||
@@ -56,4 +56,4 @@ }, | ||
"sideEffects": false, | ||
"version": "3.6.7", | ||
"version": "3.6.8", | ||
"type": "module" | ||
} |
@@ -18,7 +18,7 @@ export type FieldType = 'string' | 'number' | 'object' | 'symbol' | 'symbol' | 'undefined' | 'null' | 'array' | 'function' | ||
case 'object': { | ||
//nulls resolve to objects, so exclude them | ||
// nulls resolve to objects, so exclude them | ||
if (value === null) { | ||
return false | ||
} | ||
//arrays resolve to objects, so exclude them | ||
// arrays resolve to objects, so exclude them | ||
return typeofValue === 'object' && !Array.isArray(value) | ||
@@ -25,0 +25,0 @@ } |
import { isType } from './isType.ts' | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type | ||
export type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined | ||
@@ -37,3 +37,3 @@ export type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol | ||
export const isTypedArray = (value: unknown): value is TypedArray => { | ||
return Array.isArray(value) && !value.some((item) => !isTypedValue(item)) | ||
return Array.isArray(value) && !value.some(item => !isTypedValue(item)) | ||
} | ||
@@ -48,9 +48,9 @@ | ||
return ( | ||
isType(value, 'object') && | ||
//check if all keys are strings | ||
!Object.entries(value as object).some((item) => !isValidTypedFieldPair(item)) | ||
isType(value, 'object') | ||
// check if all keys are strings | ||
&& !Object.entries(value as object).some(item => !isValidTypedFieldPair(item)) | ||
) | ||
} | ||
//Object Type Test | ||
// Object Type Test | ||
/* | ||
@@ -57,0 +57,0 @@ interface TestObject { |
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
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155989
1088