@inploi/core
Advanced tools
Comparing version 1.11.4 to 1.11.5
@@ -18,3 +18,12 @@ type ResponseObj<V, E = unknown> = { | ||
declare const uniqueByPropertyOrThrow: <T extends PropertyKey>(propertyKey: T) => (array: { [K in T]: any; }[]) => boolean; | ||
/** | ||
* A destructive way to ensure an object has a property. | ||
* This is useful when working with unknowns. | ||
*/ | ||
declare function hasProp<K extends PropertyKey>(data: object, prop: K): data is Record<K, unknown>; | ||
/** | ||
* A sort of type-safe way to check whether a key exists in an object. | ||
*/ | ||
declare function isKeyInObj<O extends Record<string, unknown>>(key: PropertyKey, obj: O): key is keyof O; | ||
export { Flatten, NonEmptyArray, ResponseObj, Satisfies, exhaustive, invariant, uniqueByPropertyOrThrow, uniqueOrThrow }; | ||
export { Flatten, NonEmptyArray, ResponseObj, Satisfies, exhaustive, hasProp, invariant, isKeyInObj, uniqueByPropertyOrThrow, uniqueOrThrow }; |
@@ -24,3 +24,5 @@ "use strict"; | ||
exhaustive: () => exhaustive, | ||
hasProp: () => hasProp, | ||
invariant: () => invariant, | ||
isKeyInObj: () => isKeyInObj, | ||
uniqueByPropertyOrThrow: () => uniqueByPropertyOrThrow, | ||
@@ -56,6 +58,14 @@ uniqueOrThrow: () => uniqueOrThrow | ||
}; | ||
function hasProp(data, prop) { | ||
return prop in data; | ||
} | ||
function isKeyInObj(key, obj) { | ||
return key in obj; | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
exhaustive, | ||
hasProp, | ||
invariant, | ||
isKeyInObj, | ||
uniqueByPropertyOrThrow, | ||
@@ -62,0 +72,0 @@ uniqueOrThrow |
@@ -63,12 +63,6 @@ import { z } from 'zod'; | ||
data: z.ZodObject<{ | ||
type: z.ZodEnum<["partial", "full"]>; | ||
ats: z.ZodEnum<["cornerstone"]>; | ||
integrationId: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
}, { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -79,4 +73,2 @@ }>; | ||
data: { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -90,4 +82,2 @@ }; | ||
data: { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -771,12 +761,6 @@ }; | ||
data: z.ZodObject<{ | ||
type: z.ZodEnum<["partial", "full"]>; | ||
ats: z.ZodEnum<["cornerstone"]>; | ||
integrationId: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
}, { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -787,4 +771,2 @@ }>; | ||
data: { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -798,4 +780,2 @@ }; | ||
data: { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -1958,12 +1938,6 @@ }; | ||
data: z.ZodObject<{ | ||
type: z.ZodEnum<["partial", "full"]>; | ||
ats: z.ZodEnum<["cornerstone"]>; | ||
integrationId: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
}, { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -1974,4 +1948,2 @@ }>; | ||
data: { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -1985,4 +1957,2 @@ }; | ||
data: { | ||
type: "partial" | "full"; | ||
ats: "cornerstone"; | ||
integrationId: string; | ||
@@ -1989,0 +1959,0 @@ }; |
@@ -87,4 +87,2 @@ "use strict"; | ||
data: import_zod.z.object({ | ||
type: import_zod.z.enum(["partial", "full"]), | ||
ats: import_zod.z.enum(["cornerstone"]), | ||
integrationId: import_zod.z.string() | ||
@@ -91,0 +89,0 @@ }) |
{ | ||
"name": "@inploi/core", | ||
"version": "1.11.4", | ||
"version": "1.11.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "exports": { |
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
167374
2594