4.10.86 • Published 12 months ago

@diotoborg/deleniti-adipisci v4.10.86

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@diotoborg/deleniti-adipisci 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('@diotoborg/deleniti-adipisci');
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('@diotoborg/deleniti-adipisci');
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('@diotoborg/deleniti-adipisci');
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

sharedECMAScript 2023flagconstclidescriptorObject.fromEntriesclassesArray.prototype.includesrestfultyped arrayyupscheme-validationpositivetypanionvalueses-abstractCSSStyleDeclarationenderdiffespree6to5tsgraphqlespuremakeredact$.extenddebuggerjsfastcloneES2015matchAllecmascriptwritabletypeofoptimizerargsemitgroupl10nentriesqsiteratordebughasOwnspringReactiveExtensionsloggingECMAScript 5serializerbrowsertransportsetPrototypeOfSetObject.getPrototypeOfcssWeakSetfileglobal objectfullwidthdataViewsource mapwhatwgUint16Arraysettingsshrinkwraprequestes2015byteOffsetvpcforEachdependencieshelpers3dsuperstructprocesselectronclass-validatorES2021slicestreammruajaxinvariantebsoptionprotoeast-asian-widthconcatsharedarraybufferBigInt64ArrayescapefunctionscloudsearchwebObject.entriesnpmmapredirectincludescontainssortedpackageArray.prototype.flatMapfunction.lengthtoSortedsyntaxerrordeepclonecreaterm -rfcopyeverynpmignoreSymbolminimaltrimStartassertsyamltacitformmovesyntaxselfreadablenamestoobjectsqstouchArrayartfeedgetintrinsicspecarrayscensoramazonvalidationCSSreact-hooksnodemake dirECMAScript 7eventEmitterviewimmertypedFloat64ArrayapollostructuredClonees8validutilsvariablesassignFunction.prototype.nameStreamsrouterpropsetgettrimsimpledbanimationfind-upio-tsregularaccessibilitycoverageendpointindeepcopycalltypesbeanstalkuser-streamsweakmapfunctionallanguagejson-schemaworkspace:*reducemetadataprettyexpresses2017rm -frtypebinaryArrayBuffer#sliceRegExp#flagsrestbundlingObservablesspinnersschematestingprefixreact posemobileclonequeueMicrotaskfast-deep-copymanagerESnextmonorepointernalttyquotespawntypescriptec2IteratorreduxSymbol.toStringTagasciicore-jsmatchextendcolumnsjsonschemaArray.prototype.findLastIndexwindowshimcurriedkeycoreframeruuidtoolkitcolorsbinbinariesMicrosoftUint8ArraytslibvestawsefficientES2023symlinksbrowserliststablecompilerES5cloudtrailimmutablenopeassertionjQueryloadbalancingreact-hook-formjson-schema-validatorphoneparentslogtraverserequiretypesafejasmineguidbyteLengthdirlibphonenumberchildobjectcheckapistyleguideestreechannelreactRxJSarktypekeyscomparereadablestreamtapcall-bindbabel-coreURLpathstylingxmlcollection.es6RFC-6455mergevalidateparenttranspilereversedxtermcloudformationregular expressionsshamfindfigletglobString.prototype.matchAllfilterpatchfromjavascriptprivate datatermcolorutil.inspectECMAScript 2016mkdirpjapanesetransformextrapushES6consumehookformjson-schema-validationcss-in-jshas-ownJSON-Schemaastfile systemform-validationrmobjreact-testing-libraryflagsflattenconcatMapa11ysameValueZeroUint8ClampedArraysymbolspeedcachevalueredux-toolkitrgbroutingatomjsdomAsyncIteratorArray.prototype.filterimportexportrobustInt32ArraylrusesdynamodbwgetprototypeunicodegdprforkoffsettrimEndavainspectdeep-clonesearchutiljestparseasterisksfscharacterswfclassnameES2022definePropertycryptodeep-copyPromisecomputed-typesBigUint64ArraypopmotionstyleObject.definePropertyES8nativeruntimepnpm9rangeerrorregexreusetoReversedes-shimsomitObjectTypeScriptes7globalThisArray.prototype.findLastreadcolourjshintexecdotenvsafecloudfrontArray.prototype.flati18nidlefast-deep-clonedategetOwnPropertyDescriptorlocaltextbyteroute53rssstyled-componentsisArray.prototype.containsECMAScript 3datarulesworkerspinnersubprocessbundlerregexpgitignoreequalitysetImmediateES2020argvpolyfillfetchlookoptimistrdsurlreducerfast-cloneinternal slotvisualglobalmodule__proto__stylestddperformant
4.10.86

12 months ago

4.10.85

12 months ago

4.9.85

12 months ago

4.9.84

12 months ago

3.9.84

12 months ago

3.9.83

12 months ago

3.9.82

12 months ago

3.9.81

12 months ago

3.9.80

12 months ago

3.9.79

12 months ago

3.9.78

12 months ago

3.8.78

12 months ago

3.8.77

12 months ago

3.8.76

12 months ago

3.8.75

12 months ago

3.7.75

12 months ago

3.7.74

12 months ago

3.7.73

12 months ago

3.7.72

1 year ago

3.7.71

1 year ago

3.6.71

1 year ago

3.6.70

1 year ago

2.6.70

1 year ago

2.6.69

1 year ago

2.6.68

1 year ago

2.6.67

1 year ago

2.6.66

1 year ago

2.6.65

1 year ago

2.6.64

1 year ago

2.6.63

1 year ago

2.6.62

1 year ago

2.6.61

1 year ago

2.6.60

1 year ago

2.6.59

1 year ago

2.6.58

1 year ago

2.6.57

1 year ago

2.6.56

1 year ago

2.6.55

1 year ago

2.6.54

1 year ago

2.6.53

1 year ago

2.6.52

1 year ago

2.6.51

1 year ago

2.6.50

1 year ago

2.6.49

1 year ago

2.6.48

1 year ago

2.6.47

1 year ago

2.6.46

1 year ago

2.6.45

1 year ago

2.6.44

1 year ago

2.6.43

1 year ago

2.6.42

1 year ago

2.6.41

1 year ago

2.6.40

1 year ago

2.6.39

1 year ago

2.6.38

1 year ago

2.6.37

1 year ago

2.6.36

1 year ago

2.6.35

1 year ago

2.6.34

1 year ago

2.6.33

1 year ago

2.6.32

1 year ago

2.6.31

1 year ago

2.5.31

1 year ago

2.5.30

1 year ago

2.5.29

1 year ago

2.5.28

1 year ago

2.4.28

1 year ago

2.4.27

1 year ago

2.4.26

1 year ago

2.4.25

1 year ago

2.4.24

1 year ago

2.4.23

1 year ago

2.4.22

1 year ago

2.4.21

1 year ago

2.4.20

1 year ago

2.3.20

1 year ago

2.3.19

1 year ago

2.3.18

1 year ago

2.3.17

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.2.15

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.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago