BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/safe-array-concat
Run
Logout
Edit File
Size: 1.83 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/safe-array-concat/index.js
Text
Base64
'use strict'; var GetIntrinsic = require('get-intrinsic'); var $concat = GetIntrinsic('%Array.prototype.concat%'); var callBind = require('call-bind'); var callBound = require('call-bound'); var $slice = callBound('Array.prototype.slice'); var hasSymbols = require('has-symbols/shams')(); var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; /** @type {never[]} */ var empty = []; var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; // eslint-disable-next-line no-extra-parens var isArray = isConcatSpreadable ? /** @type {(value: unknown) => value is unknown[]} */ (require('isarray')) : null; /** @type {import('.')} */ module.exports = isConcatSpreadable // eslint-disable-next-line no-unused-vars ? function safeArrayConcat(item) { for (var i = 0; i < arguments.length; i += 1) { /** @type {typeof item} */ var arg = arguments[i]; // @ts-expect-error ts(2538) see https://github.com/microsoft/TypeScript/issues/9998#issuecomment-1890787975; works if `const` if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing if (!empty[isConcatSpreadable]) { // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing empty[isConcatSpreadable] = true; } // @ts-expect-error ts(2721) ts(18047) not sure why TS can't figure out this can't be null var arr = isArray(arg) ? $slice(arg) : [arg]; // @ts-expect-error ts(7015) TS can't handle expandos on an array arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] arguments[i] = arr; } } // @ts-expect-error ts(2345) https://github.com/microsoft/TypeScript/issues/57164 TS doesn't understand that apply can take an arguments object return $concatApply(arguments); } : callBind($concat, empty);
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 9
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.github
DIR
-
drwxr-xr-x
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
test
DIR
-
drwxr-xr-x
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.eslintrc
201 B
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.nycrc
216 B
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CHANGELOG.md
5.18 KB
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.d.ts
117 B
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.83 KB
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.05 KB
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
2.37 KB
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
2.52 KB
lrw-r--r--
2025-03-28 11:04:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tsconfig.json
125 B
lrw-r--r--
2025-03-28 11:04:36
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).