1.0.0 • Published 17 days ago

@crabas0npm/distinctio-ad-commodi v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

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('@crabas0npm/distinctio-ad-commodi');

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

characteroutputpicomatchrequirecollection.es6recursiveidclassesObject.entriestostringtagtrimRighttaskredux-toolkitargparsepositivewalkingsomeupbabel-coreStreamsfrommobilexhrdebuggerthreepreserve-symlinksAsyncIteratorboundsigintpostcssmatchpromisesreact animationtc39Stream[[Prototype]]processinterruptsArrayBuffer#sliceeventEmittersuperstructObject.fromEntriesprogresscommanderhigher-orderdifflimitmulti-packageES8encryptioncacheidledefaultlinewrapfixed-widthes2017removereusewebcheckframeworktestingkeyslinuxcompilerjsonexeautoprefixerstringbootstrap lessuuidexecutablelintSetprettyiterationecmascriptgradients cssparsetrimmimetypestacitwhichuninstallArray.prototype.includesECMAScript 2022Object.getPrototypeOfArray.prototype.findLastworkerimmercorsspringi18nprotopackagesvalidstartjQueryreactgetintrinsicweakmapESCSSStyleDeclarationnopecommandqueueMicrotaskasynccmdmixinsvariableswalkscheme-validationECMAScript 5curlkoreanutilcircularqueryObject.keysbreakbabelopenerelectronTypeBoxWeakMapwidthslicewhatwgstylesECMAScript 2017concurrencycolumnsES2017ECMAScript 7fastifyeverysanitizationmime$.extendarktypewatcherloggingnested cssimportiterateES2022mrueast-asian-widthES2019RegExp#flagsnegativeUint32Arraybddcode pointsRxJShasnpmES2021lookimmutablesafecall-boundfullwidthdatacryptjsonpathcallbindloadinggetfastfile systemarrayfast-deep-copyvariables in cssArray.prototype.containsqsArray.prototype.filterstableWebSocketsexecbannerintrinsicArrayBuffer.prototype.sliceECMAScript 2016expressionless.jsvaluejoipipesyntaxerrortranspilecss lesspluginoptionfull-widthpreprocessorreact-hook-formslotajax0make dirpackage.jsongetoptoptimistfastcopyterminalbundlingflatMapcollectionreact-testing-libraryinternalinternal slotURLdirectorysanitizeworkspace:*xdg-openstyleviewfast-clonestatelessstarterasciipromisesortposeES2016dependenciesdom-testing-librarybrowserlistdefinePropertyjson-schema-validationArray.prototype.flat
1.0.0

17 days ago