1.2.21 • Published 1 year ago

@devtea2027/porro-molestiae-quod-asperiores v1.2.21

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

@devtea2027/porro-molestiae-quod-asperiores 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('@devtea2027/porro-molestiae-quod-asperiores');
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('@devtea2027/porro-molestiae-quod-asperiores');
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('@devtea2027/porro-molestiae-quod-asperiores');
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

karmavestfetchxhrlengthregexpnpmduplexasserttapInt32ArrayFloat32ArrayiteratortelephoneserializationcolorsmapreducePromisegetPrototypeOfconsumeprotojesttimemkdirpperformantawesomesauceprocesscss variabletapereusedescriptorsloggingstylesreal-timedefineESnextqueryviewauthjsmovemapmrues2018pyyamlstringifytestersiginttoolkitvisualansiwordwrapexpresscompile lessnegativeES2021gradients cssutilfast-copyframeworkspinnersshebangArray.prototype.filterpolyfilles7symlinkpathstringsuperagentperformanceglobalstdlibjsdiffiamObject.assignconfigregular expressionsformattingbuffersfromlogsetPrototypeOftermIteratores5es2017diffcloudsearcheventDispatcherl10npasswordidinterruptsdebugtdddeep-copyparentsjapaneseflattenflatMapgetintrinsiccallbindbufferECMAScript 2016trimStartfixed-widthimmerHyBis3sameValueZerowritesharedarraybufferrm -rfUint32Arraylook-upfastclonedebuggerObject.valuesdayjshasgenericscallboundieboundES5busya11yUint8ArrayURLencryptionfindassertionpropertyjQuerystyled-componentsreduxinspecthardlinksES2022proxyrmdirdirectoryObservablesES8hotoutputcolorwalkingcopyartless.jsformatarktypeObject.entriesidentifiersinferenceESsetmimesettingssetImmediatereactregularfast-clonenamecss-in-jselbCSSStyleDeclarationECMAScript 2017optionObject.keysjsonpathclassnamesjwttrimenderlesses2016bcryptlinkUint16ArraysequencearrayforEachAsyncIteratorwatchFileimporttypescloudfrontInt8Arrayupclientdescriptorerror-handlingString.prototype.trimdirfastcopywrapsimpledbreadabledatavieweslintconfighasOwnesECMAScript 2021weakmapspeedexitbannerredux-toolkittakergbES6Float64Arraylintconsolepackage managercollectionutilitiessuperstructasynccheckeast-asian-widthjsxcharactersInt16Arraymatchflatbootstrap cssomitparsingserializeyupcommand-lineprototypedefinePropertyUint8ClampedArraycore-jstypescriptconcatpositivefull-widthtypedpnpm9privatewaitwalkless compilerprotocol-buffersconnectrmextendTypeScripthooksstreamsignalscode pointsyamlsesenumerable
1.2.20

1 year ago

1.2.21

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.16

1 year ago

1.2.17

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago