
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
arraybuffer.prototype.slice
Advanced tools
ES spec-compliant shim for ArrayBuffer.prototype.slice
An ES spec-compliant ArrayBuffer.prototype.slice
shim. Invoke its "shim" method to shim ArrayBuffer.prototype.slice if it is unavailable.
This package implements the es-shim API interface. It works in an ES5-supported environment and complies with the spec.
Most common usage:
var assert = require('assert');
var slice = require('arraybuffer.prototype.slice');
var ab = new ArrayBuffer(1);
var arr = new Uint8Array(ab);
arr[0] = 123;
var ab2 = slice(ab);
var arr2 = new Uint8Array(ab2);
arr2[0] = 234;
assert.deepEqual(arr, new Uint8Array([123]));
assert.deepEqual(arr2, new Uint8Array([234]));
if (!ArrayBuffer.prototype.transfer) {
slice.shim();
}
var ab2 = ab.slice();
var arr2 = new Uint8Array(ab2);
arr2[0] = 234;
assert.deepEqual(arr, new Uint8Array([123]));
assert.deepEqual(arr2, new Uint8Array([234]));
Simply clone the repo, npm install
, and run npm test
v1.0.4 - 2024-12-15
5e59635
call-bind
, es-abstract
, get-intrinsic
0afbb59
@es-shims/api
, auto-changelog
, es-value-fixtures
, object-inspect
, tape
d76caf4
call-bind
, es-abstract
, es-errors
, get-intrinsic
2b374a2
@es-shims/api
, @ljharb/eslint-config
, object-inspect
, tape
a24fd39
aud
with npm audit
c704fb0
0274b32
673f754
FAQs
ES spec-compliant shim for ArrayBuffer.prototype.slice
The npm package arraybuffer.prototype.slice receives a total of 25,006,468 weekly downloads. As such, arraybuffer.prototype.slice popularity was classified as popular.
We found that arraybuffer.prototype.slice demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.