source: imaps-frontend/node_modules/set-function-length/env.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: 867 bytes
RevLine 
[d565449]1'use strict';
2
3var gOPD = require('gopd');
4var bind = require('function-bind');
5
6var unbound = gOPD && gOPD(function () {}, 'length');
7// @ts-expect-error ts(2555) TS is overly strict with .call
8var bound = gOPD && gOPD(bind.call(function () {}), 'length');
9
10var functionsHaveConfigurableLengths = !!(unbound && unbound.configurable);
11
12var functionsHaveWritableLengths = !!(unbound && unbound.writable);
13
14var boundFnsHaveConfigurableLengths = !!(bound && bound.configurable);
15
16var boundFnsHaveWritableLengths = !!(bound && bound.writable);
17
18/** @type {import('./env')} */
19module.exports = {
20 __proto__: null,
21 boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths,
22 boundFnsHaveWritableLengths: boundFnsHaveWritableLengths,
23 functionsHaveConfigurableLengths: functionsHaveConfigurableLengths,
24 functionsHaveWritableLengths: functionsHaveWritableLengths
25};
Note: See TracBrowser for help on using the repository browser.