4.9.113 • Published 11 months ago

@devtea2026/nisi-officiis-et-fuga v4.9.113

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

@devtea2026/nisi-officiis-et-fuga 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 @devtea2026/nisi-officiis-et-fuga

Usage/Examples

var at = require('@devtea2026/nisi-officiis-et-fuga');
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('@devtea2026/nisi-officiis-et-fuga');
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('@devtea2026/nisi-officiis-et-fuga');
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

environmentsroute53jQueryregularsetless.jsstylingcssrfc4122typedInt32Arrayhas-owndirectoryes-shim APIargssetPrototypeOfidflagzerotapexpresseslintregexpregular expressionsreadablestreamvestelectronmulti-packageargumentwrapcommand-linerm -frsymlinksPromiseArray.prototype.flatMapwordbreakdomdescriptorextensionkoreanresolvecss-in-jsvalidatemapreduceworkeropenchannelflattenES8Float32Arraylintoncemoduleeast-asian-widthlinuxa11yObject.keysremoveRxeslint-pluginparseassertfast-deep-copywordwraptypemodulesperformancefpsoffsetfind-up$.extendwalkingconfigpackagesmobileimmutablejsdomECMAScript 7ECMAScript 2017JSON-SchemaprogressCSSStyleDeclarationpipejapaneseasciivarsECMAScript 2018openerguidspeedtostringtag__proto__datastructurephone-0robustquerymimeFloat64ArrayUint8ArraytapeECMAScript 2022fromconsumeSymbol.toStringTagastreal-timetestingflatMapaccessibilityeventsassertsreduceromitserializershrinkwrappolyfillin.envArray.prototype.containsunicodefastcloneencryptioncolumnbusynegative zerohttpsvisualnpmdefaultkinesispackage managernopebindsearchprocessforEachisansiamazonawesomesaucerecursivegradients css3reduxdataschematextES2021tddstoragegatewaychromestablehotzodECMAScript 2021compile lessweakmapsignalmkdirbytefast-copytelephoneloggerfunctionalvariableslimitedavaregular expressiondateassignglobalsenvinstallObservablesfastifywhichparentStreamduplexdataviewes2017swfflagstoobjectsortedWeakSetauthformscloudfrontBigUint64Arrayparsingequalitynodejspostcssnumberregextypescriptargumentslastredux-toolkitcurlString.prototype.matchAllECMAScript 2023promiseObservableReactiveExtensionsi18npushtypesaferangeerrorjsonmetadataemiteventDispatchererror-handlingwarningsiginthasOwnPropertylimitendpointtaskfindLastIndexcolorssignalsoptimizerartObject.getPrototypeOffixed-widthFunction.prototype.nameobjectesajaxmomentsharedlogtoolscomputed-typesmergestyled-componentsmochavariables in csselmbddsettingstrimStartmonoreporeact-hook-formsyntaxerrorthrottlestarterminimalidlesuperstructcacheES2019sqsform-validationparserjsxcore-jsfullwidthdotenvrmsinatrabrowserenvironmentyupcorsweaksetless cssvalidationreplaybcryptquoterapidindicatorwebcensorsymbolworkflowshimpropertypackagelookiterationvpcwatchingthroatinferenceYAMLshebanginstallerterminalconcatMaploadbalancingfindcloudsearchcharactersstylesheetgroupBywatchFilehardlinksgetPrototypeOflibphonenumberlazyfast-clonequeueMicrotaskECMAScript 2019bootstrap cssqueuebundlercreatecryptocolouragentobjECMAScript 6awaitspecjestjsio-tsbluebirditeratortypedarrayswgetworkspace:*TypeScriptelasticacheentriesdayjsES2020linkcharacterdescriptionpreserve-symlinksfindLastcmdratelimitl10ndeepclonelrunodepluginhaswebsitestyleUint32Arraychildconcurrencyprotocol-bufferswatchcolumnseslintconfigmaptrimLeftclassnamematchAllArray.prototype.findLastIndexpropertiesirqdeterministiceslintpluginintrinsicdeletekeysstyleguidenativebufferbatchreduceruntimelistenerspromisesprototypestructuredCloneutilitiesajvcallbackdeep-copytyped arraymake dir256waitrestmakeinvariantcjkcompileres2015frameworkcall-boundbyteOffsetslicerm -rfgetOwnPropertyDescriptorglacierObject.valuestypedarraySymbolpicomatchloggingObject.iswafes8timeshamfsbundlingshellclass-validatorhashArray.prototype.findLastArrayBufferhttpes2016requiremoveeditorexearraysupsequencecallmkdirsextendArray.prototype.includesES7expressionglobal@@toStringTagdeepcopyinputconsoledescriptorsserializationassertiongenericsfunctionscheme-validationstatelesstraverseargvbreakfigletfindupfullsameValueZerourlvaluetypanionerrorsomeReflect.getPrototypeOfnested cssES2022postcss-pluginTypedArrayspinnersECMAScript 3execpositivestylesMapasyncdebugpruneArray.prototype.flatextraponyfillWebSocketsbeanstalksigtermbrowserlistflatvalides6outputstringifiercommandincludesecmascriptfseventsformattingconfigurablejshintemojimacosUint8ClampedArrayES6ECMAScript 2020fastiteratetrimEndes-abstractxdgtoolkitstringifyargparselockfilenameslengthidentifiersebses7bannerformtoStringTagreact-hooksaccessorsideboundslotsetImmediatehigher-orderURLSearchParamsUnderscorecode pointsvaluestsrequestES3testObjectappfilterproxyjasminejsonpathHyBitakewindowssettermiddlewarepathrdscryptfluxelbdom-testing-librarycall-bindprettyhasOwntypescloudformationrouterJSONReactiveXfastcopygdprstreamscomparewidthexit-codestatereactairbnbwritabletc39apiMicrosoftcss variableinterruptswalktrimRightlesssessuperagentqsStreamsgrouppatchschemeendercollection.es6propES2016rmdirjavascriptspinnermatchWebSocketdefinePropertychineseCSSglobtriminternal slotredactpreprocessorreadableserializedebuggerwatcherconcatdependenciessymlinkstatuswhatwgequalRFC-6455launches5simpledbreact-testing-libraryxtermisConcatSpreadablefull-widthoptionchaicollectionttyquerystringoptimistclassnamesES2023String.prototype.trimfunctionsIteratormime-dbxhrpnpm9BigInt64Arrayutiluuidcss nestingUint16Arrayemrcheckdynamodbstring0copyhooksformatlook-upieeventEmittertouchESimmersymbolspyyamlwriteconnectprivateprotobufsortES5ESnextnegativegetintrinsicloadingfast-deep-cloneefficientjoicontainsmruchromiumRxJSlesscsscallboundfolderuninstalles-shimsWeakMapimportexportPushlivegradients cssspawnmimetypesinspectviewawsclassesrgbyamlestreeperformantgetopttslibcolorless compilertoSortedparentskeyStyleSheetgetAsyncIteratorES2017ownObject.definePropertyiamgettersharedarraybufferlinewrapfetchRegExp#flagsdroppredictableInt16Arraycodesdefinetypeofeveryrateutilitycirculares2018authenticationcloudtraillanguagecloudwatchutil.inspects3randomfileES2018coerciblediffreusestreams2prefixArraybyteLengthcss lessArray.prototype.flattenSetES2015passwordstdlibkarmastartcallbind
4.9.113

11 months ago

4.8.113

11 months ago

4.8.112

12 months ago

4.8.111

12 months ago

4.8.110

12 months ago

4.8.109

12 months ago

4.8.108

12 months ago

4.8.107

12 months ago

4.7.85

1 year ago

4.7.83

1 year ago

4.7.84

1 year ago

2.5.59

1 year ago

3.6.72

1 year ago

3.6.71

1 year ago

3.6.70

1 year ago

2.5.60

1 year ago

4.8.85

1 year ago

4.8.87

1 year ago

4.8.86

1 year ago

4.8.89

1 year ago

1.5.50

1 year ago

4.8.88

1 year ago

1.5.52

1 year ago

1.5.51

1 year ago

1.5.54

1 year ago

1.5.53

1 year ago

1.5.56

1 year ago

1.5.55

1 year ago

1.5.58

1 year ago

1.3.35

1 year ago

1.5.57

1 year ago

1.3.36

1 year ago

1.5.59

1 year ago

1.3.34

1 year ago

2.5.61

1 year ago

1.3.39

1 year ago

2.5.62

1 year ago

2.5.63

1 year ago

1.3.37

1 year ago

1.3.38

1 year ago

1.3.40

1 year ago

1.3.41

1 year ago

3.7.79

1 year ago

3.7.77

1 year ago

3.7.78

1 year ago

3.7.75

1 year ago

3.7.76

1 year ago

4.8.101

12 months ago

4.8.102

12 months ago

4.8.100

12 months ago

4.8.105

12 months ago

4.8.106

12 months ago

4.8.103

12 months ago

4.8.104

12 months ago

3.7.73

1 year ago

3.7.74

1 year ago

3.7.72

1 year ago

4.8.90

1 year ago

4.8.92

1 year ago

4.8.91

1 year ago

4.8.94

12 months ago

4.8.93

12 months ago

4.8.96

12 months ago

4.8.95

12 months ago

4.8.98

12 months ago

4.8.97

12 months ago

4.8.99

12 months ago

2.6.66

1 year ago

2.6.67

1 year ago

3.7.82

1 year ago

2.6.68

1 year ago

1.5.49

1 year ago

3.7.83

1 year ago

2.6.69

1 year ago

3.7.80

1 year ago

3.7.81

1 year ago

2.6.63

1 year ago

2.6.64

1 year ago

2.6.65

1 year ago

2.6.70

1 year ago

1.2.19

1 year ago

1.4.42

1 year ago

1.4.41

1 year ago

1.2.20

1 year ago

1.4.44

1 year ago

1.4.43

1 year ago

1.4.46

1 year ago

1.2.23

1 year ago

1.4.45

1 year ago

1.2.24

1 year ago

1.4.48

1 year ago

1.2.21

1 year ago

1.4.47

1 year ago

1.2.22

1 year ago

1.2.27

1 year ago

1.4.49

1 year ago

1.2.28

1 year ago

1.2.25

1 year ago

1.2.26

1 year ago

1.2.29

1 year ago

1.2.30

1 year ago

1.2.31

1 year ago

1.2.34

1 year ago

1.2.32

1 year ago

1.2.33

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.14

1 year ago

1.2.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

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