|
Last change
on this file since cdcff72 was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
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.