
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
array.prototype.concat
Advanced tools
ES spec-compliant `Array.prototype.concat` shim/polyfill/replacement that works as far down as ES3.
An ES spec-compliant Array.prototype.concat shim/polyfill/replacement that works as far down as ES3.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.
Because Array.prototype.concat depends on a receiver (the “this” value), the main export takes the array to operate on as the first argument.
Note: this list is not exhaustive.
var concat = require('array.prototype.concat');
var assert = require('assert');
var a = [1, 1, 1];
assert.deepEqual(concat(a, 1, 2), [1, 1, 1, 1, 2]);
assert.deepEqual(a, [1, 1, 1]);
var concat = require('array.prototype.concat');
var assert = require('assert');
/* when Array#concat is not present */
delete Array.prototype.concat;
var shimmed = concat.shim();
assert.equal(shimmed, concat.getPolyfill());
assert.equal(shimmed, Array.prototype.concat);
assert.deepEqual([1, 2, 3].concat(1, 2, 3), concat([1, 2, 3], 1, 2, 3));
var concat = require('array.prototype.concat');
var assert = require('assert');
/* when Array#concat is present */
var shimmed = concat.shim();
assert.equal(shimmed, Array.prototype.concat);
assert.deepEqual([1, 2, 3].concat(1, 2, 3), concat([1, 2, 3], 1, 2, 3));
Simply clone the repo, npm install, and run npm test
FAQs
ES spec-compliant `Array.prototype.concat` shim/polyfill/replacement that works as far down as ES3.
The npm package array.prototype.concat receives a total of 1,172 weekly downloads. As such, array.prototype.concat popularity was classified as popular.
We found that array.prototype.concat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.