@drop-in/new
Version:
A SvelteKit Svelte 5 PocketBase Starter Kit with a CLI
10 lines (8 loc) • 326 B
text/typescript
/* eslint-disable @typescript-eslint/no-explicit-any */
const objectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
/**
* Object.hasOwn polyfill
*/
export const hasOwn: (object: any, key: PropertyKey) => boolean =
(Object as any).hasOwn ||
((object, key) => objectPrototypeHasOwnProperty.call(object, key));