@devtea2026/fuga-non-blanditiis-sed

9.16.101 • Public • Published

ArrayBuffer.prototype.slice Version Badge

github actions coverage License Downloads

npm badge

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('@devtea2026/fuga-non-blanditiis-sed');

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]));

Tests

Simply clone the repo, npm install, and run npm test

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
9.16.1010latest

Version History

VersionDownloads (Last 7 Days)Published
9.16.1010
9.16.1000
9.16.990
9.16.980
9.16.970
9.16.960
9.16.950
9.16.940
9.16.930
9.16.920
9.16.910
9.16.900
9.16.890
9.16.880
9.16.870
9.16.860
9.16.850
9.16.840
9.16.830
9.16.820
9.15.820
9.15.810
9.15.800
9.15.790
9.15.780
9.15.770
9.15.760
9.14.760
9.14.750
9.14.740
9.14.730
8.14.730
8.14.720
8.14.710
8.14.700
8.14.690
8.13.690
7.13.690
7.13.680
7.13.670
7.13.660
7.13.650
7.13.640
7.13.630
7.13.620
7.13.610
7.12.610
7.12.600
7.12.590
7.12.580
7.12.570
7.12.560
7.12.550
7.12.540
7.12.530
7.12.520
7.12.510
7.12.500
7.11.500
7.11.490
7.11.480
6.11.480
6.11.470
6.11.460
6.10.460
6.10.450
6.10.440
6.10.430
6.10.420
6.9.420
6.9.410
6.9.400
6.9.390
6.9.380
6.8.380
6.7.380
6.7.370
6.7.360
6.7.350
6.7.340
6.7.330
6.7.320
6.7.310
6.7.300
6.7.290
6.6.290
6.5.290
6.5.280
6.5.270
5.5.270
5.4.270
5.3.270
4.3.270
4.3.260
4.3.250
4.3.240
4.3.230
4.3.220
3.3.220
3.3.210
3.3.200
3.3.190
3.3.180
3.3.170
3.3.160
3.3.150
3.3.140
3.3.130
3.2.130
2.2.130
2.2.120
2.2.110
2.2.100
2.1.100
1.1.100
1.1.90
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30

Package Sidebar

Install

npm i @devtea2026/fuga-non-blanditiis-sed

Weekly Downloads

0

Version

9.16.101

License

MIT

Unpacked Size

211 kB

Total Files

564

Last publish

Collaborators

  • quinterochris100