1.0.0 • Published 1 year ago

@landmineaknpm2/omnis-distinctio-accusantium v1.0.0

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

@landmineaknpm2/omnis-distinctio-accusantium Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2015 spec-compliant Array.prototype.values 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 spec.

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

Example

var values = require('@landmineaknpm2/omnis-distinctio-accusantium');
var assert = require('assert');
var iterate = require('iterate-iterator');

assert.deepStrictEqual(iterate(values([1, 2, 3])), [1, 2, 3]);
assert.deepStrictEqual(iterate(values([1, 0, 1])), [1, 0, 1]);
assert.deepStrictEqual(iterate(values([NaN])), [NaN]);
assert.deepStrictEqual(iterate(values([1,,3])), [1, undefined, 3]);
var values = require('@landmineaknpm2/omnis-distinctio-accusantium');
var assert = require('assert');
/* when Array#values is not present */
delete Array.prototype.values;
var shimmedMap = values.shim();
assert.deepStrictEqual(shimmedMap, values.getPolyfill());
assert.deepStrictEqual(iterate([1, 2, 3].values()), [1, 2, 3]);
assert.deepStrictEqual(iterate([1, 0, 1].values()), [1, 0, 1]);
assert.deepStrictEqual(iterate([NaN].values()), [NaN]);
assert.deepStrictEqual(iterate([1,,3].values()), [1, undefined, 3]);
var values = require('@landmineaknpm2/omnis-distinctio-accusantium');
var assert = require('assert');
/* when Array#values is present */
var shimmedMap = values.shim();
assert.equal(shimmedMap, Array.prototype.values);
assert.deepStrictEqual(iterate([1, 2, 3].values()), [1, 2, 3]);

Tests

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

errorassertwidthcloudfrontObservablecore-jsUint8ClampedArrayargumentspasswordes8tddlinkpropertiesfixed-widthmacosfindLastIndexES8tostringtaghookformcolourtrimRighttrimLeftArray.prototype.flatkeysoptimistArrayBuffer#sliceoffsetjsonpathWeakMapobjectawesomesaucepostcss-plugintoolkitwatchFilenamesjavascriptrandomrestfulstyleguidesetImmediateURLSearchParamsphoneECMAScript 6whatwglogvpcemitES2018rangeerrorbindyamlcolumnsSymbol.toStringTagECMAScript 2021JSON-SchemaArray.prototype.includesfileimmutableeditorcheckratecss-in-jsprivatefastifyarktypespawnrmsafewatchisConcatSpreadableFloat32Arrayrecursiverestenumerablecloudformationtapeequalexpressmrukoreanefficientcollection.es6emojilaunchformsvisualshimerror-handlingloggerless csscloudtrailwordwrapECMAScript 2019endereslintconfigcryptlinttestingelmkarmaescapeArrayboundpositiveecmascriptsideelasticacheexitlimitjsdiffexit-codelrunodeES2020uuidtestsetwebamazonhashtypeerrores2017terminalArray.prototype.flattenWebSocketsswftapajves5asynccliparentsstdlibreactes2015jsxfast-copyparentcolorsartextensionproxyes6rm -rfmulti-packagecallbindtoSortedquerymkdirpsharedarraybufferarraystslanguageaccessibilitymovechaicall-boundprotowindowsarraybufferfilterwritehasOwnPropertydebuggercreateincludesirqimportStreamsmetadatatesterenvironmentvariables in cssObject.fromEntriesopenopenerpipebundlerstyled-componentsReactiveXfpspromisesECMAScript 5jschildweaksethas-ownfetchtrimEndprettyObject.keyssameValueZerotypescharacterstoolswatchernegativeoutputelectronbufferssinatraloggingworkspace:*ECMAScript 7environmentsredux-toolkitcmdsyntaxArrayBuffer.prototype.sliceimmershrinkwrapinstalloperating-systemstreamsflagsperformancematchAllspinnerresolvetoobjectMaprobustassertsAsyncIteratorbcryptxtermglobalsstreams2css lesschinesedeterministicstylesprotobufbrowserslistcallboundvariablesconcatsuperagentdeep-clonecode pointsremoveexpressiondatareaddom-testing-librarysignalsregularstringbootstrap lesszeroasciimomentmakePromise256ECMAScript 3qsjshinttyped arrayarrayinterruptsECMAScript 2018concurrencysqsfunctionalserializerhasOwnrequireoptimizeriamfluxtextauthenticationassertionYAMLECMAScript 2017lookcopydeep-copymergeES2019real-timefast-deep-copybrowserlistes2018es-shimspromiseinvarianttypedObject.definePropertyunicodestatelessconfigs3parseendpointES2017cloudwatchminimalgetintrinsiclibphonenumberbusypackagemodulefind-uppathcontainsUint16Arrayencryptioncss variablecallbackmimetypesWebSocketRFC-6455beanstalkstablefindLastpatchrgbvaliddescriptorloadingawseslintfseventsfindcorecompilerTypeScriptclassnamesdescriptors-0es7dropslice.envebsdefinePropertymkdirsviewpersistentstatusiterationvalidateless compilercommand-lineInt8ArrayECMAScript 2020valueUint32ArraydescriptionconnectgetOwnPropertyDescriptorwrapoptionschemeES6runtimeObject.valuesbluebirdthroatsimpledbRxchromiumpicomatchspecxdgstyleeslintpluginstylingcurlxdg-open
1.0.0

1 year ago