3.6.72 • Published 1 year ago

@hishprorg/commodi-magni-nihil v3.6.72

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

@hishprorg/commodi-magni-nihil 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 @hishprorg/commodi-magni-nihil

Usage/Examples

var at = require('@hishprorg/commodi-magni-nihil');
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('@hishprorg/commodi-magni-nihil');
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('@hishprorg/commodi-magni-nihil');
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

sestypedarrayes6sharedarraybuffersnsregular-expressioneveryReactiveExtensionsbinaryemrInt8Arrayroute53rangeerrortranspilepushsigtermcompile lessiteraterapidpersistentvalids3Function.prototype.name@@toStringTagamazonECMAScript 3es-abstractcharactersideprototypecryptserializescheme-validationchromeBigUint64Arrayschemaproxyhasreact-hooksES2020prettymruframeridlegetterdeep-clonefast-cloneeslintrandomroutingirqStreamscollection.es6childwriteopensslhelperschaiairbnbrouteeslintpluginURLSearchParamsfperrorvalidateimmerremovegitignoredotenvreact-testing-libraryWebSocketsObject.valuesrequirerfc9562deep-copydirectorybannerstreamcolumnshasOwnPropertywritablematchesfunctionsargsfastclonedeleteSetefficientendpointclassnameArrayBuffer.prototype.slicetoolsargumentlruwindowcommanderlinktextextrathreeconfigurableutilscolorfixed-widthRxJSutil.inspectdescriptorseslintconfigfastifygetintrinsicArraytoReversedregexpECMAScript 5core-jspackage.jsonvarsES2015execfindinferencejsonschemaeslint-pluginuploadglobalThises2017propincludeshooksbootstrap cssidentifiersloadbalancingcodesreact posestylinges-shim APIinvariantvestunicoderobustsettimefstrimStarttc39babelurlsameValueZerojsdomprotocol-buffersequalprotobufautoprefixerinstallerpurecollectionString.prototype.matchAlljshintspinnersgradients cssselfcomputed-typescloudformationprefixsafevisualglacierloggingmoveoptimistObservablewaapil10noptionpropertieswaitpromisetestcertificatescoloures2015circularajvpredictableReactiveXdroppicomatchignoretypeformatspeedstringifier-0TypedArraycss nestingcreateECMAScript 2015isemitredactgesturesdirpolyfillaccessibilitynested cssargvarraybuffergradients css3cloudfrontsymbolglobalreplayless mixinsshamenumerablecjkutilitiesentriesbindobjectxtermmonorepoansiresolvedayjstypeerrorsetPrototypeOfassertiontypeofslotqueuecss variablebrowserforEachdefinejson-schema-validatorJSON-Schemamodulefile systemdeterministicperformancebrowserslistlanguageweaksetObjectoperating-systemfullvaluesreadablezxtsdescriptionreact-hook-formtsliblibphonenumberclass-validatormodulesflagsloading[[Prototype]]symlinksexecfilenativepnpm9react-componentclassnamesliveflatcopyvariables in cssObject.getPrototypeOfObject.keysreusenodesortedcurriedworkspace:*javascriptglobal this valueString.prototype.trimgrouprules3dletfindLasthttpspopmotionSymbolmakeeventEmitterES5dependency managerECMAScript 2022queueMicrotasktakestoragegatewayUint8ClampedArrayoutputlessAsyncIteratora11ygraphqlfromsymlinkrequestwarningtypedarraysbyteOffsetnegativeglobal objectless compilerESWebSocketasynctypespasswordpostcss-pluginprivatecss less.gitignoreconfigpreserve-symlinksec2arrayBigInt64ArrayformsoffsetsetImmediatelinuxECMAScriptSymbol.toStringTagomitquerystringstyleguideexit-codebytebrowserlistfast-deep-cloneECMAScript 2021private datajwtstringparsingoncedom-testing-libraryStreamtranspilertypescriptruntimees5URLstyled-componentsartregexpinoplugintouchtyped arraystatelessconstdatastructurelistenersless.jsrfc4122es2018dateRegExp#flags0eventDispatchercallwgetdiffcryptopositivestreamsUnderscorelocalviewlintrgbgetoptinternalCSSStyleDeclarationES3censorfunction.lengthes7ArrayBufferprogressbeanstalksomeequalityObject.assigndeepbabel-corespawnslicestylemkdirprotottyfastPromiseterminalIteratortoArraymulti-packagestartervpcenvpropertytransportRFC-6455xhrtrimreadchineseserializationjsdiffpackage manager6to5binpyyamljsonmapreducecloudsearchmatchAlltelephonenamesinstallauthenticationconsoleimmutableTypeScripttoSortedutilESnexterror-handlingtddexpressionpreprocessorObject.definePropertyArray.prototype.flatMapbusywafcompilerebsapolloObject.entriesinspectacornFloat32ArraybcryptInt16ArraytrimLeftassertjsxglobiteratorkeysio-tstraverseinputstatusECMAScript 2020findLastIndexdataviewhandlerscompareposeECMAScript 2023fileredux-toolkitES8parsercurlmergebundlerwhichjestchromiumObject.isform-validationsuperagentdefinePropertycss-in-jsnpmignorecoerciblesqsimportexportdragreversedaccessorpatchfluxreal-timekinesistypedexecutewalkTypeBoxlesscssjQuerybuffersponyfillarktypeenderstringifyhardlinks__proto__RxhasOwnmacosmkdirssetterdescriptorchannelES2021JSONsigintcolumnshrinkwrapeffect-tsStyleSheet256simpledbawesomesauceassertsmomentajaxprocesscallboundfastcopycall-boundlockfilefnmatchfast-copyrecursiveconcatMapdataViewes8animationextendconcatinloggerarraysstylesvariablessyntaxerrorES7figletsettings
3.6.72

1 year ago

3.6.71

1 year ago

3.6.70

1 year ago

3.6.69

1 year ago

3.6.68

1 year ago

3.6.67

1 year ago

3.6.66

1 year ago

2.6.66

1 year ago

2.6.65

1 year ago

2.6.64

1 year ago

2.6.63

1 year ago

2.6.62

1 year ago

2.5.62

1 year ago

2.5.61

1 year ago

2.5.60

1 year ago

2.5.59

1 year ago

2.5.58

1 year ago

2.5.57

1 year ago

2.5.56

1 year ago

2.5.55

1 year ago

2.5.54

1 year ago

2.5.53

1 year ago

2.5.52

1 year ago

2.5.51

1 year ago

2.5.50

1 year ago

1.5.50

1 year ago

1.5.49

1 year ago

1.5.48

1 year ago

1.5.47

1 year ago

1.4.47

1 year ago

1.4.46

1 year ago

1.4.45

1 year ago

1.4.44

1 year ago

1.4.43

1 year ago

1.4.42

1 year ago

1.4.41

1 year ago

1.4.40

1 year ago

1.4.39

1 year ago

1.4.38

1 year ago

1.4.37

1 year ago

1.4.36

1 year ago

1.4.35

1 year ago

1.4.34

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.3.30

1 year ago

1.3.29

1 year ago

1.3.28

1 year ago

1.3.27

1 year ago

1.3.26

1 year ago

1.3.25

1 year ago

1.3.24

1 year ago

1.3.23

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.1.16

1 year ago

1.1.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

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago