4.1.13 • Published 1 month ago

@dramaorg/voluptate-quo-atque v4.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@dramaorg/voluptate-quo-atque Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES spec-compliant Array.prototype.slice 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.slice depends on a receiver (the “this” value), the main export takes the array to operate on as the first argument.

Engines where this is needed

Note: this list is not exhaustive.

  • Safari 10 - 13
  • Chrome 48+ (v8 bug)
  • node 6+

Example

var slice = require('@dramaorg/voluptate-quo-atque');
var assert = require('assert');

var a = [1, 2, 3];
assert.deepEqual(slice(a, 1, 2), [2]);
assert.deepEqual(slice(a, -2), [2, 3]);
var slice = require('@dramaorg/voluptate-quo-atque');
var assert = require('assert');
/* when Array#slice is not present */
delete Array.prototype.slice;
var shimmed = slice.shim();
assert.equal(shimmed, slice.getPolyfill());
assert.equal(shimmed, Array.prototype.slice);
assert.deepEqual([1, 2, 3].slice(1, 2), slice([1, 2, 3], 1, 2));
var slice = require('@dramaorg/voluptate-quo-atque');
var assert = require('assert');
/* when Array#slice is present */
var shimmed = slice.shim();
assert.equal(shimmed, Array.prototype.slice);
assert.deepEqual([1, 2, 3].slice(1, 2), slice([1, 2, 3], 1, 2));

Tests

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

sameValueZeroawesomesaucecallaccessibilityeventDispatcheres8filterprotostructuredClonedefinemetadatapositiveratelimitlimitedroutingloggingstringifierstarterlocationtelephoneObject.valuespromisescloudformationidlees-shim APIRxasciideepcommand-linetermclassnameassertsES6variables in cssprunesetImmediatewgetawses-abstractfast-deep-cloneconfigarraysbundler$.extendECMAScript 3workspace:*styleswalkRegExp.prototype.flagsless.jsxhrECMAScript 2017byteLengthisextenditeratorglobrequireemitrm -frpolyfillcode pointscloneconfigurablemruwaitStyleSheetqueueMicrotaskcliReflect.getPrototypeOfString.prototype.matchAllbeanstalkpushsymbolsjoistableprogressES8definePropertyserializationcallboundquoteUint8ClampedArraybuffersvalidomitInt32ArrayArraysomees2018collection.es6nameownnegativeloggersnsMapjasmineformatjssharedJSON-SchemaschemadirsharedarraybufferrmencryptionlimittrimnodejsPromiselesscssbannerauthenticationcachepostcsschineseinferenceflagfunctionstostringtagpackagesdeepclonegroupcommandObject.getPrototypeOfECMAScript 5toolssidetoStringTagtslibcoercibles3datamochaargsairbnbes2015bootstrap cssfluxexpressyupObject.ismapreducelistenersio-tsless mixinsfixed-widthAsyncIteratorproxyjsonsettermoduleeventsreducerkarmashimSymbol.toStringTagoffsetpackage managerfastprefixwhichidredactroutedebugmatchesECMAScript 2020zeroFloat32ArrayfastcopytypaniongroupBylinkdependency managerES2020styled-componentsparsingform-validationqueuestylesheetzodimportkinesisconcatMapreduxcsserrorbatchdeletefastifyObjectparsefindLaststoragegateway[[Prototype]]fastclonees-shimstyped arraymimetypestaskFloat64ArrayArray.prototype.filterflattenapolloWebSocketESnextPushwrapfilepropslicekeypackage.jsonflatMapdeterministicES7figletimmerfullECMAScript 2018variablesWeakSetcolumnfpschaiprivate datarmdirlogsetPrototypeOfjapanesespinnersfsES2019schemecjkratereducecommanderdescriptionstylingECMAScript 2022languagenumberhashbcryptstyleviewspinnerjsdiffiterationArrayBuffer.prototype.slicefunctionalweakmapArray.prototype.flatlazyespreewatchES3emojicensorflattypeswatchingES5ec2ECMAScript 2023charactersbootstrap lesswatcherless cssHyBi@@toStringTagclientchannelurlcreateshellchromiumutilityfunctionframeworkmomentperformantredirectajves7utiltoolkitECMAScript 7containsES2022requestes6pipebrowserlisthttplockfilegradients cssdescriptorsajaxtsredux-toolkitstreamsjestweaksetunicodecurlgraphqlhasOwnPropertyclassnameslivecss-in-jseveryformattingupsuperstructhasOwncloudsearchchromeWebSocketsReactiveExtensionsjwtbddintrinsic
4.1.13

1 month ago

3.1.12

1 month ago

3.1.11

1 month ago

3.1.10

1 month ago

4.1.12

1 month ago

3.1.9

1 month ago

3.0.9

1 month ago

3.0.8

1 month ago

3.0.7

1 month ago

3.0.6

2 months ago

3.0.5

2 months ago

3.0.4

2 months ago

3.0.3

2 months ago

3.0.2

2 months ago

2.0.2

2 months ago

2.0.1

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago