1.0.0 • Published 22 days ago

@rabiepenpm/aspernatur-voluptate-laboriosam v1.0.0

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

@rabiepenpm/aspernatur-voluptate-laboriosam 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('@rabiepenpm/aspernatur-voluptate-laboriosam');
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('@rabiepenpm/aspernatur-voluptate-laboriosam');
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('@rabiepenpm/aspernatur-voluptate-laboriosam');
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

typesafeMaputilIteratorSettddprefixjsxES2023ES2020stylesfunctionlimitedcacheshamtoobjectescapeStreamsastconfigjwtes-shim APIlengthbatchjsonpathES3directoryairbnbstreams2findregular expressionfilterbyteOffsetimmerbrowserslisthasOwnPropertysqs__proto__validatelanguagecolourtc39regularconnectrmfigletcollection.es6$.extendpasswordspinnerimmutableforEachenvironmentInt32Arrayinternal slotdescriptionbannerdiffnegative zerouuidslotformattingworkflowpolyfillURLvalidsharedansiJSON-Schemaplugincall-bindfast-deep-clonejsfastifyeslint-pluginajvfolderYAMLPromisereact-hook-formcloudformationregexputil.inspectcloudsearchsomesyntaxtslibquotecontainslinkStyleSheetaccessorconcatMapstyledayjsES2019typeofjasminequeuedeep-copyfast-copypackage.jsonratelimitrm -rfless cssgetchannelstreamsTypeScriptsetImmediatesuperstructHyBiautoprefixeravastatecss variablewordbreakrateloadbalancinglistenerscheckerrorECMAScript 5vestsharedarraybufferES6writabledeterministiceveryObject.definePropertytoArraycommanddataa11yECMAScript 2018promisesescreatedeepcopyjsdiffgraphqlsetrestfulxtermsymbolUint16ArrayFloat64ArraySymbolduplexkoreanoptimistmimetypesArraynegativetypedmonorepointerruptsclassnameseventsfastcloneentriesES2021has-ownprototypecurltoSortedReflect.getPrototypeOftypedarraysReactiveExtensionszeroemojiio-tsresolveexitCSSloginchailibphonenumberWebSocketcss nestingRegExp#flagsenvperformanttrimRightpostcsspathamazontakestyled-componentschineseiswraphardlinksliveRegExp.prototype.flagsapplookstructuredCloneframeworkstringifydom-testing-librarysignalsserializerpropertiesES2018classesAsyncIteratorgradients css3ECMAScript 2017es2015windowsflatawesomesauceECMAScript 2021inspectUint8Arraylook-uppositivezodcalltypaniontrimStartlimitECMAScript 2019droptrimLeftnopeprotoreplaysetPrototypeOfJSONtermloggingjQuerydomtesterUint8ClampedArraygetoptes-abstracttyped arrayTypeBoxcolorWeakSetstoragegatewayspectrimdateeast-asian-widthurlawaitwatchcallbackbootstrap cssvariables in csstaptestl10nauthshellopenobjoncepostcss-plugindotenviedescriptorbootstrap lessoutputes7core-jsrgbcall-boundpyyamlfilejapaneselazyponyfilloptimizerparentsparserbrowserbufferArrayBuffer#slice
1.0.0

22 days ago