1.0.0 • Published 1 year ago

@tea07001/dolorem-eos-necessitatibus v1.0.0

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

@tea07001/dolorem-eos-necessitatibus Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ESnext spec-compliant Array.prototype.findLast 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 proposed spec.

Because Array.prototype.findLast depends on a receiver (the this value), the main export takes the array to operate on as the first argument.

Getting started

npm install --save @tea07001/dolorem-eos-necessitatibus

Usage/Examples

var findLast = require('@tea07001/dolorem-eos-necessitatibus');
var assert = require('assert');

var arr = [1, [2], [], 3, [[4]]];
var isNumber = function (x) { return typeof x === 'number' };

assert.deepEqual(findLast(arr, isNumber), 3);
var findLast = require('@tea07001/dolorem-eos-necessitatibus');
var assert = require('assert');
/* when Array#findLast is not present */
delete Array.prototype.findLast;
var shimmed = findLast.shim();

assert.equal(shimmed, findLast.getPolyfill());
assert.deepEqual(arr.findLast(isNumber), findLast(arr, isNumber));
var findLast = require('@tea07001/dolorem-eos-necessitatibus');
var assert = require('assert');
/* when Array#findLast is present */
var shimmed = findLast.shim();

assert.equal(shimmed, Array.prototype.findLast);
assert.deepEqual(arr.findLast(isNumber), findLast(arr, isNumber));

Tests

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

utilitieses-abstractthrottlees2017hasheventsbreakfetchcorees-shimsrestfulstyleguideassertionconcatESvariables in cssonceprocessserializeshimwrapfast-deep-cloneArray.prototype.containspackage managersuperstructvaluesomitroute53characterdiffregexpropertiestypedarraysYAMLloggersortJSONglobmatchesfind-upconnectfastlengthpropWebSocketprototype$.extendphonecolorsRegExp#flagsajvtelephonemimetypesredux-toolkitchinesedirarrayss3streamfilterECMAScript 2019propertyproxyelmjesttermreact-testing-libraryfast-copyserializerReflect.getPrototypeOftaskmonorepointerruptsURLstdlibdefinePropertysimpledblimitforEachpatchassertformattingincircularyupeslint-pluginwatchermkdirloadingimportexportpushObject.definePropertyargumentmatchAllargsgetwgetentriesshellbeanstalkcss variablecssaccessibilityes2015isio-tseslintpluginInt8ArraybcryptECMAScript 2023TypedArraytrimLeftesvaluecjkECMAScript 2016lint[[Prototype]]sortedtypeofroutingargvES2017performantdategenericsfindupoptimistjwtconcurrencyjapanesewritableeventDispatcherbyteLengthkinesisECMAScript 2017linkObject.assigncloudwatchstringECMAScript 3reducespecerrorbrowserlistautoprefixerchannelRxstringifyexectrimRightefficientpipelimitednodejswalkingjssyntaxerrorsetImmediatecacheUint16ArrayelasticachekeysequalitystatepromiseweakmaptrimStartpreprocessorautoscalingdeleteES8SetrouterquotenamesqueueMicrotaskloadbalancingcss lessUint8ArrayObject.entriescallbackpostcssSymbolunicodestoragegatewayebsmetadataserializationdeterministicfile systemcliES2022ArrayBuffer.prototype.slicetypesexit-codearrayworkertyped-0ECMAScript 2018emitmake.envwatchingisConcatSpreadablebrowserparentec2throatdataviewbddchaifindLastReactiveExtensionsasynccurlprotocol-bufferstrimEndagentgroupcode pointsObservablesequal__proto__rm -frconsolermbindjsonkeyhasOwnPropertycommandIteratortakejsonpathreadECMAScript 5awaitString.prototype.matchAlltriminspectreact-hook-formglacierdescriptorflagshigher-orderpatheventEmittera11yfps256mrupreserve-symlinksinternal sloturlJSON-Schemabufferavacommanderworkspace:*eslintconfigbanneriegetintrinsicregular expressionsECMAScript 2022upmovedropArraytypeclassnamerfc4122waitbootstrap cssBigInt64Arraytslibmocharoutesignaltapemkdirpseswordbreakdeep-clonemomentcall-boundES7stylegetOwnPropertyDescriptorsearcharraybufferrequestlruArray.prototype.flatMapframeworkoperating-systemparsehelpersfolderUint32Arrayutil.inspectless cssES2019assertsPushstylesheetfullwidthdynamodbownrequireObject.valuesamazontoSortedcolumnsFloat64Arrayhasdependency managerinvariantpromisesStreamssymlinkclassestyped arrayfigletdeepcloneintrinsicmodulesHyBipicomatchshebangauthES3styled-componentsextensionendercss nestingwidthopenruntimezodhotcolourregularawesomesaucecall-bindlibphonenumberdebuggervpcconsumeawspackage.jsonartqueueargparsesameValueZeroponyfillchromiumfast-clonepasswordcompile lesskoreannopepackagefastcloneeslinttapwalknativeflathasOwnextra
1.0.0

1 year ago