1.4.19 • Published 1 year ago

@devtea2027/voluptatibus-in-dolores-placeat v1.4.19

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

@devtea2027/voluptatibus-in-dolores-placeat Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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

Example

var filter = require('@devtea2027/voluptatibus-in-dolores-placeat');
var assert = require('assert');

assert.deepEqual(filter([1, 2, 3], function (x) { return x >= 2; }), [2, 3]);
assert.deepEqual(filter([1, 2, 3], function (x) { return x <= 2; }), [1, 2]);
var filter = require('@devtea2027/voluptatibus-in-dolores-placeat');
var assert = require('assert');
/* when Array#filter is not present */
delete Array.prototype.filter;
var shimmedFilter = filter.shim();
assert.equal(shimmedFilter, filter.getPolyfill());
var arr = [1, 2, 3];
var isOdd = function (x) { return x % 2 !== 0; };
assert.deepEqual(arr.filter(isOdd), filter(arr, isOdd));
var filter = require('@devtea2027/voluptatibus-in-dolores-placeat');
var assert = require('assert');
/* when Array#filter is present */
var shimmedFilter = filter.shim();
assert.equal(shimmedFilter, Array.prototype.filter);
assert.deepEqual(arr.filter(isOdd), filter(arr, isOdd));

Tests

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

keysjwtsigtermcall-bindreplayCSSstreamslanguagehasOwnPropertynameswgetvisualisConcatSpreadablecss nestingrobusteslintconfigutilitiesdeepclonereadablepreprocessorphoneutilitylasttrimRightoptiones2018bootstrap lessconsoleObject.fromEntrieszeroinpasswordexpressioncolorsJSONes2016ES2019es8elbjestsesagentresolvequeryglacierarraysPushpyyamlforms0setRxJSdeterministicpruneassertionworkerdeep-clonesettingsSymbol.toStringTagbyteOffsetdeleteparsedomprettyextrawriterestcomparereactstatelessfulltypedshamserializerURLSearchParamsassertsjshintcallobjmixinsObservableimportrequirereal-timethrottleSymbolcryptmodulesfastclonebufferiscollection.es6emojiiteratorObjectfast-copycircularvalidatecoremochasyntaxerrorshebangprotocolumnAsyncIteratortrimLeftpreserve-symlinksbuffersArray.prototype.findLastIndexrm -rftermtrimStartio-tsratelimitartminimalfluxserializationArray.prototype.filterES2017movecolumnsstreams2fastlruArraychaicore-jsESconcurrencyrdses2015iteratepostcssdropECMAScript 2017less.jsenvironmentmkdirautoprefixermodulefunctionsyntaxObject.entriesgdprMicrosoftenvECMAScript 2020react-testing-libraryecmascriptjsonrm -frmonorepopackage.jsonsomenpmutil.inspectCSSStyleDeclarationmatcheses7find-uptoStringTagwalkYAMLerror-handlingutilrecursiveec2httpsclassnamestyped arrayauthWeakSetperformancenested csswidthpromiseargslinuxvalidspeedStreamspicomatchBigInt64Arrayclass-validatoridsymlinkspropertyfastcopyelmES2020helpersvalidationsnsRegExp#flagsRxArray.prototype.findLastECMAScript 2023css variablesignalsurllivejsdiffwhatwgArray.prototype.flatES5spinnersrmemrstateupclassesECMAScript 2022linewrapfseventscss-in-jses-shimsviewjsxtoobjectnodejsaccessorimmutablees-shim APIes6typeerrorfixed-widthtypesES3await-0zodmkdirsfindstringifierreducerwrapReactiveXmergedateSetformattingArrayBuffer#slicedirstdlibnativebundlerregular expressionsa11ystylesheetjsonpathflagspackage managerreuseweakmapdefinePropertycommanderwebbcryptmake dirhardlinksES2018enderhas-ownIteratortrimECMAScript 2016touchextendelectronbreakcallboundttytypanioncloudformationlimitbddqueueMicrotaskstringRFC-6455nopedeeppostcss-pluginsetPrototypeOflinkFloat32ArrayUint16ArrayyamlcjkmapoutputdefinedataViewrmdirdependenciesstylestypetoSortedworkflows3argparseargumentcodesdayjsspecECMAScript 2015groupBylistenersasciipipesortedinstallerUint8Arraydirectorysigintebsschemefast-deep-copyxterminstalleslint-pluginwordwrapcollectionchromeloggingassertless csslimitedmkdirpfromsetImmediatereadablestreamtoArrayfolderfetchtrimEndparentseslintelasticacheproptapeexitinspectpredictableterminalArray.prototype.flattenhttpglobalsasyncglobalsuperstructWeakMapeslintpluginlibphonenumberES2023commandObject.assignbluebirdObservablesshellreact-hook-formes-abstractString.prototype.matchAllmakebootstrap cssquoteclientrouterUint32Arrayconsumefiltertypedarrays[[Prototype]]inputArray.prototype.flatMapcharacterschromiumautoscalingchannelastequalsliceclonebrowserslistimportexportswfECMAScript 6amazonestreearktypeponyfillmimetypessearchcloudwatchexecES2016rgbObject.valuesregexpstabletostringtagenvironmentsconfigurableless mixinsprefixsymbolssequencedebugvariablesObject.keysthroatclies2017vestlookprivate dataopenjsdomcloudfrontloggercompilerfile systemreduxsymbollintstyleless compilerInt16ArrayECMAScript 5byteLengthwatchercall-boundi18npositiveTypeScriptTypedArray
1.4.19

1 year ago

1.4.18

1 year ago

1.4.17

1 year ago

1.4.16

1 year ago

1.3.15

1 year ago

1.3.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago