main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
549 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var result = require('./')();
|
---|
4 |
|
---|
5 | var test = {
|
---|
6 | __proto__: null,
|
---|
7 | foo: {}
|
---|
8 | };
|
---|
9 |
|
---|
10 | /** @type {import('./accessor')} */
|
---|
11 | module.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.