index.js 298 B

123456789101112131415
  1. 'use strict';
  2. var test = {
  3. __proto__: null,
  4. foo: {}
  5. };
  6. // @ts-expect-error: TS errors on an inherited property for some reason
  7. var result = { __proto__: test }.foo === test.foo
  8. && !(test instanceof Object);
  9. /** @type {import('.')} */
  10. module.exports = function hasProto() {
  11. return result;
  12. };