source: imaps-frontend/node_modules/has-proto/accessor.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 549 bytes
RevLine 
[79a0317]1'use strict';
2
3var result = require('./')();
4
5var test = {
6 __proto__: null,
7 foo: {}
8};
9
10/** @type {import('./accessor')} */
11module.exports = function hasAccessor() {
12 /* eslint no-proto: 0 */
13 return result
14 && !('toString' in test)
15 // eslint-disable-next-line no-extra-parens
16 && /** @type {{ __proto__?: typeof Object.prototype }} */ ({}).__proto__ === Object.prototype
17 // eslint-disable-next-line no-extra-parens
18 && /** @type {ReadonlyArray<never> & { __proto__?: typeof Array.prototype }} */ (
19 []).__proto__ === Array.prototype;
20};
Note: See TracBrowser for help on using the repository browser.