BLUE
PHP 7.4.33
Path:
/var/www/idmc.bitkit.dk/httpdocs/node_modules/set-function-length
Run
Logout
Edit File
Size: 1.24 KB
Close
/var/www/idmc.bitkit.dk/httpdocs/node_modules/set-function-length/index.js
Text
Base64
'use strict'; var GetIntrinsic = require('get-intrinsic'); var define = require('define-data-property'); var hasDescriptors = require('has-property-descriptors')(); var gOPD = require('gopd'); var $TypeError = require('es-errors/type'); var $floor = GetIntrinsic('%Math.floor%'); /** @type {import('.')} */ module.exports = function setFunctionLength(fn, length) { if (typeof fn !== 'function') { throw new $TypeError('`fn` is not a function'); } if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { throw new $TypeError('`length` must be a positive 32-bit integer'); } var loose = arguments.length > 2 && !!arguments[2]; var functionLengthIsConfigurable = true; var functionLengthIsWritable = true; if ('length' in fn && gOPD) { var desc = gOPD(fn, 'length'); if (desc && !desc.configurable) { functionLengthIsConfigurable = false; } if (desc && !desc.writable) { functionLengthIsWritable = false; } } if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { if (hasDescriptors) { define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true); } else { define(/** @type {Parameters<define>[0]} */ (fn), 'length', length); } } return fn; };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.github
DIR
-
drwxrwxr-x
2024-09-23 09:37:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.eslintrc
404 B
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.nycrc
216 B
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CHANGELOG.md
4.76 KB
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
env.d.ts
222 B
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
env.js
867 B
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.d.ts
256 B
lrw-rw-r--
2024-09-23 09:37:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.24 KB
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.06 KB
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
2.64 KB
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
2.12 KB
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tsconfig.json
116 B
lrw-rw-r--
2024-09-23 09:37:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).