UNPKG

contentful-sdk-core

Version:
18 lines (14 loc) 416 B
// eslint-disable-next-line @typescript-eslint/no-explicit-any function enforceObjPath(obj, path) { if (!(path in obj)) { const err = new Error(); err.name = 'PropertyMissing'; err.message = `Required property ${path} missing from: ${JSON.stringify(obj)} `; throw err; } return true; } export { enforceObjPath as default }; //# sourceMappingURL=enforce-obj-path.js.map