source: imaps-frontend/node_modules/has-proto/index.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 302 bytes
RevLine 
[d565449]1'use strict';
2
3var test = {
4 __proto__: null,
5 foo: {}
6};
7
8var $Object = Object;
9
10/** @type {import('.')} */
11module.exports = function hasProto() {
12 // @ts-expect-error: TS errors on an inherited property for some reason
13 return { __proto__: test }.foo === test.foo
14 && !(test instanceof $Object);
15};
Note: See TracBrowser for help on using the repository browser.