1.0.6 • Published 6 days ago

@teamteanpm2024/veniam-vero-reiciendis v1.0.6

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

@teamteanpm2024/veniam-vero-reiciendis Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ESnext spec-compliant Array.prototype.at 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.at 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 @teamteanpm2024/veniam-vero-reiciendis

Usage/Examples

var at = require('@teamteanpm2024/veniam-vero-reiciendis');
var assert = require('assert');

var arr = [1, [2], [], 3];

var results = at(arr, function (x, i) {
	assert.equal(x, arr[i]);
	return x;
});

assert.deepEqual(results, [1, 2, 3]);
var at = require('@teamteanpm2024/veniam-vero-reiciendis');
var assert = require('assert');
/* when Array#at is not present */
delete Array.prototype.at;
var shimmedFlatMap = at.shim();

var mapper = function (x) { return [x, 1]; };

assert.equal(shimmedFlatMap, at.getPolyfill());
assert.deepEqual(arr.at(mapper), at(arr, mapper));
var at = require('@teamteanpm2024/veniam-vero-reiciendis');
var assert = require('assert');
/* when Array#at is present */
var shimmedIncludes = at.shim();

var mapper = function (x) { return [x, 1]; };

assert.equal(shimmedIncludes, Array.prototype.at);
assert.deepEqual(arr.at(mapper), at(arr, mapper));

Tests

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

equalityclassnametelephoneprocesspromisesjsonschemaiemonorepobrowserdeepcopystreamjwtbootstrap lesspostcsscollection.es6ECMAScript 2020loges-shim APIinstalleroffsetfastcloneauthenticationcharactershimexpressdependenciesloadingdotenvpyyamlES2018linuxthroatwritabledomReflect.getPrototypeOftaperdsfilterloadbalancingqueryreact-hookswriteECMAScript 2021macoses-shimswrapflagecmascriptloggercolorssignalpostcss-pluginprivatejsdomwaitcontainscoercibleECMAScript 3typeerrorYAMLcallback256getintrinsicstatusregexpyamlreduxsortestreedependency managerfantasy-landURLbuffersshelltoolskarmaObject.definePropertyeventDispatchermime-dbpositiveArray.prototype.flatMaputil.inspectmatchAllECMAScript 6pipeinputglacierwatcherstyled-componentswhichefficientdom-testing-librarytimemixinsFunction.prototype.nameroute53tostringtagsyntaxerrorArray.prototype.includesformsigtermreal-timeletmochatestingwaapii18nec2WebSocketscryptseslengthgetcloudsearchreadablestreamcacheequalcall-bindInt8ArrayrequestArraysqspopmotionES7setImmediatehasBigInt64ArrayObject.entriescloudwatchworkflowerrortouchsymbolECMAScript 2019mapregexfindindicatordayjsnamegetOwnPropertyDescriptorwatchES2023enderconfigenvargves2017iteratorstatelesstoolkitglobhookformtranspilerfseventsmobilehttpfast-copyisserializationgenericsPushextradefineschemarmdirratelimitclass-validatorposeObjectmetadataemitcloudtrailAsyncIteratorspinnerzeroobjectpreserve-symlinkswalkvestcopypluginextensionhigher-orderemrslicewhatwgauthfile systemform-validationphoneES8Uint8ArrayUint32Arrayes2016less compiler.envES2020jsxdescriptorinspectlockfilefindLastIndexio-tscss nestingsameValueZerolistenerslimitonceformsprogressmatchesbytegradients css3snsencryptionboundkeysjson-schema-validatorinternal slottslibmiddlewareassigntrimEndRxstringviewupspeedoperating-systemspecreact-testing-librarymapreducelimitedArray.prototype.filterdebugdataviewrandomloggingSettakeUnderscoreirqdatescheme-validationquoteruntimecolourMicrosoftbindArray.prototype.findLastresolveArrayBuffer.prototype.sliceconcatbcryptclassnamescoreObservablefsprunevalidatorkoreanserializertc39immutableRFC-6455awaitdirectorystylingfromtranspilebddECMAScript 2022react animationprefixoutputECMAScript 2016Float32ArrayexecspringasyncnodeiterateES2017east-asian-widthsettercolumnsloteveryString.prototype.matchAllString.prototype.trimcss lessregular expressionslook-upFloat64ArraynumberweakmaptrimLeftfast-cloneeventslookponyfillmruconfigurablesymlinkvarserializenegativerapidbrowserslistInt32ArrayaccessibilitynodejseslintautoprefixerredactESnextJSONinvariantregularcompilerparsingproxyinterruptsfunctionutilitiesshebangdatastructureyupECMAScript 2023multi-packageMapargparseminimaldescription[[Prototype]]pathdeletenativeprivate datatrimStartreduceres5ES5utilityUint8ClampedArrayES2019Array.prototype.flattenes7iteration0searchArray.prototype.containsartmodulejavascriptenumerablecloudformationcss-in-jsRegExp#flagschromiumjson-schema-validationsomecloneoptimistpackage.jsonelectronprototypeSymbolexit-codebabel-corecharactersarrayweaksetratebrowserlistoptionendpointfilewatchFileperformancetexttypesafecolorperformantbundlingvaluesless.jsgroupjQuerywindowsprotocol-buffersstartervalidatefullsimpledbintrinsicsyntaxeslint-pluginfinduplasturlstoragegatewaytoobjectstylesparentscensorStyleSheetstructuredClonelinkpoint-freepatchagentchaikeyreuseavadataViewwafconcurrencyfppolyfillguidapianimationflagses2015buffercryptonopeimportStreamsuuidcss variable_.extendtesterreduceassertfigletairbnbArrayBuffer#slicereadableRxJSReactiveExtensionsfindLastWeakSetstylesheetcloudfrontTypeBoxlazyObject.getPrototypeOfStreamreacttypedarraysdeep-clonequeueMicrotaskcolumnssettingsassertstypedarrayduplexes-abstractsignalssortedcircularl10narraysvaluehandlerstaskArrayBufferasciistreamsjsES3Object.keysWeakMaps3a11ynegative zeroeslintpluginmake diruninstall@@toStringTagarraybufferchinesevisualpackagestyledeeptermdirES2021httpsbyteLengthgroupBysuperstructnamesajaxarktypeescapejsonvariables6to5formattingstringifierxtermgetterfull-widthObject.fromEntriesthreerecursivesafeuser-streamslibphonenumberlanguageJSON-Schema$.extendbatchqsbalancedwidthsetsymbolsdynamodbspinnersredux-toolkitlruformatsequenceTypeScript3dprotobufless mixinsmkdirpeventEmitteriamTypedArrayfastcopydeepclonecollectionpicomatchwordbreaksuperagenthooks-0tsthrottlejestremovestablecommandreact-hook-formlesscssmkdirsetPrototypeOfsanitizeshamtoSortedbyteOffsetpreprocessorschemeinferencedropcssrmreact posefastcomparepackage managercreateparseframerbootstrap cssshrinkwrapidleReactiveXES2016cjktrimless cssfast-deep-clonemkdirsamazonfixed-widthwordwraplessincludestacittrimRightObservablesconsumeassertionbusyhelpersEScallbindbreakextenddeterministictyped arraytypanionmatchObject.assignclassesinstalltypedawesomesaucepasswordmovecommanderHyBiawscode pointsflatMapcomputed-typesutilgesturesttyobjtddstreams2BigUint64ArrayenvironmentSymbol.toStringTagECMAScript 5regular expressionsigintmomentgdprramdainternalexpressionfpsfullwidthstringifyURLSearchParamstraverseframeworkes2018hardlinksparentastconsolerangeerrorterminalworkspace:*variables in csssharedarraybufferES2015vpcrm -rfes6fast-deep-copytestECMAScript 2017cliwatchingUint16Arrayrfc4122Array.prototype.flatexitvalidationjson-schemapersistentcurriedutilslinewrapbluebirdpropertyquerystringcommand-linecompile lesscodesrm -frworkerfunctionsargsECMAScript 2015japanese
1.0.6

6 days ago

1.0.5

7 days ago

1.0.4

8 days ago

1.0.3

9 days ago

1.0.2

10 days ago

1.0.1

11 days ago

1.0.0

11 days ago