Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
amatya /
quiz1 /
node_modules /
safe-array-concat /
[ HOME SHELL ]
Name
Size
Permission
Action
.github
[ DIR ]
dr-xr-xr-x
test
[ DIR ]
dr-xr-xr-x
.eslintrc
201
B
-rw-rw-rw-
.nycrc
216
B
-rw-rw-rw-
CHANGELOG.md
4.08
KB
-rw-rw-rw-
LICENSE
1.05
KB
-rw-rw-rw-
README.md
2.52
KB
-rw-rw-rw-
index.d.ts
117
B
-rw-rw-rw-
index.js
1.84
KB
-rw-rw-rw-
package.json
2.4
KB
-rw-rw-rw-
tsconfig.json
125
B
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : README.md
# safe-array-concat <sup>[![Version Badge][npm-version-svg]][package-url]</sup> [![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] [![npm badge][npm-badge-png]][package-url] `Array.prototype.concat`, but made safe by ignoring Symbol.isConcatSpreadable ## Getting started ```sh npm install --save safe-array-concat ``` ## Usage/Examples ```js var safeConcat = require('safe-array-concat'); var assert = require('assert'); assert.deepEqual([].concat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with normal concat'); assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'arrays spread as expected with safe concat'); String.prototype[Symbol.isConcatSpreadable] = true; assert.deepEqual([].concat('foo', Object('bar')), ['foo', 'b', 'a', 'r'], 'spreadable String objects are spread with normal concat!!!'); assert.deepEqual(safeConcat('foo', Object('bar')), ['foo', Object('bar')], 'spreadable String objects are not spread with safe concat'); Array.prototype[Symbol.isConcatSpreadable] = false; assert.deepEqual([].concat([1, 2], 3, [[4]]), [[], [1, 2], 3, [[4]]], 'non-concat-spreadable arrays do not spread with normal concat!!!'); assert.deepEqual(safeConcat([1, 2], 3, [[4]]), [1, 2, 3, [4]], 'non-concat-spreadable arrays still spread with safe concat'); ``` ## Tests Simply clone the repo, `npm install`, and run `npm test` [package-url]: https://npmjs.org/package/safe-array-concat [npm-version-svg]: https://versionbadg.es/ljharb/safe-array-concat.svg [deps-svg]: https://david-dm.org/ljharb/safe-array-concat.svg [deps-url]: https://david-dm.org/ljharb/safe-array-concat [dev-deps-svg]: https://david-dm.org/ljharb/safe-array-concat/dev-status.svg [dev-deps-url]: https://david-dm.org/ljharb/safe-array-concat#info=devDependencies [npm-badge-png]: https://nodei.co/npm/safe-array-concat.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/safe-array-concat.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/safe-array-concat.svg [downloads-url]: https://npm-stat.com/charts.html?package=safe-array-concat [codecov-image]: https://codecov.io/gh/ljharb/safe-array-concat/branch/main/graphs/badge.svg [codecov-url]: https://app.codecov.io/gh/ljharb/safe-array-concat/ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-array-concat [actions-url]: https://github.com/ljharb/safe-array-concat/actions
Close