dbaas
Version:
Database as a service. Expose db to REST and GraphQL.
11 lines • 415 B
JavaScript
export const isObject = (obj) => {
return typeof obj === "object" && obj !== null && !Array.isArray(obj);
};
export const isKeyValue = (obj) => {
return (isObject(obj) &&
Object.entries(obj).every(([key, value]) => typeof key === "string" && typeof value === "string"));
};
export function hasProperty(value, propertyName) {
return propertyName in value;
}
//# sourceMappingURL=typeGuards.js.map