9449b54e28713f89d327102d88aa80a18b7d21df1fbee84e0b466aac3dfdc4dc0fc741b31a4b65daa9f5de146b61af4375ecd1c4c6a3e34cb244e92c0670bb 549 B

1234567891011121314151617181920
  1. 'use strict';
  2. var result = require('./')();
  3. var test = {
  4. __proto__: null,
  5. foo: {}
  6. };
  7. /** @type {import('./accessor')} */
  8. module.exports = function hasAccessor() {
  9. /* eslint no-proto: 0 */
  10. return result
  11. && !('toString' in test)
  12. // eslint-disable-next-line no-extra-parens
  13. && /** @type {{ __proto__?: typeof Object.prototype }} */ ({}).__proto__ === Object.prototype
  14. // eslint-disable-next-line no-extra-parens
  15. && /** @type {ReadonlyArray<never> & { __proto__?: typeof Array.prototype }} */ (
  16. []).__proto__ === Array.prototype;
  17. };