UNPKG

gatsby-source-prismic

Version:

Gatsby source plugin for building websites using Prismic as a data source

1 lines 595 B
{"version":3,"file":"hasOwnProperty.cjs","sources":["../../../src/lib/hasOwnProperty.ts"],"sourcesContent":["/**\n * Determines if an object contains a given property. It augments the provided\n * object's type to include the property.\n *\n * @returns `true` if `obj` contains a `prop` property, `false` otherwise.\n */\nexport const hasOwnProperty = <X extends object, Y extends PropertyKey>(\n\tobj: X,\n\tprop: Y,\n): obj is X & Record<Y, unknown> => {\n\treturn obj.hasOwnProperty(prop);\n};\n"],"names":[],"mappings":";;AAMa,MAAA,iBAAiB,CAC7B,KACA,SACkC;AAC3B,SAAA,IAAI,eAAe,IAAI;AAC/B;;"}