1.2.1 • Published 11 days ago

@teamteanpm2024/cupiditate-minima-animi v1.2.1

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

@teamteanpm2024/cupiditate-minima-animi 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/cupiditate-minima-animi

Usage/Examples

var at = require('@teamteanpm2024/cupiditate-minima-animi');
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/cupiditate-minima-animi');
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/cupiditate-minima-animi');
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

datastructurestreamsstatelessmergeisConcatSpreadableclassesES6asciibanneryamlaccessibilityeslint-pluginReactiveXwarningbddobjectcss-in-jsdraghigher-ordermonorepoes-shimsconsoletrimRightconnectworkspace:*varpasswordprototypeescapemodulesformchannelexpresspostcssqueueMicrotaskfsarktypemacosgradients cssparserdefineMicrosoftawaitCSSStyleDeclarationavadependenciesbcryptArray.prototype.includeshashmimetypesArray.prototype.flattenstringifyxssmiddlewarefullwidthspinnersvariablesassignratelimitgrouppopmotiongdprcharactertrimjsconsumemake dirdatafindbundler-0zodArrayBuffer.prototype.slicerangeerrorpackage.jsonpathchromiumbootstrap lessstylesheetvalidatelinkfastcopytypeerrorisidleratees-abstractES7querylazyArrayBuffer#slicetypecmd3dprefixoptimizersymbolsprunefastifyObservablestyled-componentsbootstrap cssawesomesauceexeWebSocketsextra0es-shim APIjwtJSON-Schemacolumnstypanionnativerequireclassname256quotejsdiffbatchtoobjectURLSearchParamsmatchAllpromisesWeakMapinvariantstylestylestestartauthES2016watcherjsonlanguagehooksramdascheme-validationrgbiteratefast-deep-clonelockfilejesta11yless.jsfetchmatchextendzeroformatpyyamlless compilershelldayjsvalidationfast-deep-copyautoprefixerbrowserslistchromereact-hook-formcloneendernopesameValueZerostartertypescriptextensionfigletkoreanFloat32ArrayrmruntimehasOwnclass-validatortestingstatuswidthESAsyncIteratorES2020chineseUint8Arrayspinnerieerrorl10nprotocol-buffersexecutablefast-copysigintlimitedemojiecmascriptttyvalidutilitytddlinuxTypedArrayform-validationcommandECMAScript 2021frameworkworkerinferencegesturestypesgraphqlECMAScript 2023lrues5descriptorreduxreducesuperstructes2015Object.fromEntriesdeep-cloneArray.prototype.findLastmoveBigUint64Arraydefaultmomentpatchajvreact-hooksjson-schema-validationasyncsigtermdeep-copyerror-handlingwatchfromes2017deepcopyloggingloggerredactES8queueECMAScript 2018superagentconcatMapwhatwgfpsharedwebcss nestingencryptionreact animationflatfullfull-widthcolour@@toStringTagmetadatajsxperformantxdg-openarraybufferhandlerscensorstreams2cssopensinternalreact-testing-libraryfastclonesortfindLastdomestreeStreamsdeepclonestructuredClonearraysreactES2017persistentlistenersinternal slotdescriptorsArraystringmapStyleSheetlastletes8rapidutilitiescolorreuseentriestesterObject.valuesFloat64Arraykeybufferselectrontyped arrayframerbusyObject.assigncall-boundtacitmulti-packagehelpersclienttapewalki18ndataViewastlaunchserializerRFC-6455genericsfilterbyteLengthflagsargumentsObservablessetPrototypeOfequalcallSetquerystringupapolloanimationtermuser-streamsmochafseventsgetintrinsicvaluesfilemobileoperating-systemHyBislotsymbolvisualsignalstrimStartwaapipackageObject.definePropertyenumerableES2015valueeslintbytecodeseveryfindLastIndexlook-updatekarmaReflect.getPrototypeOftostringtag_.extendlintmoduleRxJSimmutablearraytypeofsettingsuninstallECMAScript 2019deepnegativeponyfillchaicorsRegExp.prototype.flagscollectionlookiteratorPromiseWeakSeteslintconfigstreamdeterministictouchbindRxtraverserm -frgradients css3directoryinspectsanitizenamepreprocessorwritablelengthcurriedcode pointsviewoptimistvalidatortsbyteOffsetmkdirpinstallersanitizationcheckObject.isexpressiontypedarraybabelefficientcreatecallbackreadsyntaxlinewraplogsymlinkinputopenerstylingduplexprocessprettyArray.prototype.filterES2019pnpm9circularsignalregular expressionfast-clonespawngetterObject.entriesconfigprotobufRegExp#flagsfixed-widthutil.inspectformscomputed-typesjQueryeventEmitterloadingaccessorequalitydataviewglobauthenticationwebsitecallbindredux-toolkitreadablestreamsyntaxerrorremovewgetassertscontainsiterationArray.prototype.flatfunctions__proto__indicatoroutputnumberjapanesegetOwnPropertyDescriptorassertthrottlepoint-freeinstallES3StreameswatchFileansiconfigurablecoerciblesequencePushbabel-corecollection.es6transpileargumenttoArrayapiES2021npmreal-timesafepromisephonemime-dbURLcommand-linegetrequestmixins
1.2.0

12 days ago

1.2.1

11 days ago

1.1.0

13 days ago

1.0.0

14 days ago