source: node_modules/set-function-length/env.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 836 bytes
Line 
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
18module.exports = {
19 __proto__: null,
20 boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths,
21 boundFnsHaveWritableLengths: boundFnsHaveWritableLengths,
22 functionsHaveConfigurableLengths: functionsHaveConfigurableLengths,
23 functionsHaveWritableLengths: functionsHaveWritableLengths
24};
Note: See TracBrowser for help on using the repository browser.