5.9.113 • Published 1 year ago

@devtea2026/cumque-numquam-minima-ad v5.9.113

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

@devtea2026/cumque-numquam-minima-ad Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES7/ES2016 spec-compliant Array.prototype.includes 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.includes depends on a receiver (the this value), the main export takes the array to operate on as the first argument.

Engines that need this package include:

  • IE (all versions)
  • Safari < 9
  • Firefox < 43, and 99-101
  • Chrome < 47
  • Edge < 14
  • node < 6

Getting started

npm install --save @devtea2026/cumque-numquam-minima-ad

Usage

Basic usage: includes(array, value, fromIndex=0)

var includes = require('@devtea2026/cumque-numquam-minima-ad');
var assert = require('assert');
var arr = [ 'one', 'two' ];

includes(arr, 'one'); // true
includes(arr, 'three'); // false
includes(arr, 'one', 1); // false

Example

var arr = [
	1,
	'foo',
	NaN,
	-0
];

assert.equal(arr.indexOf(0) > -1, true);
assert.equal(arr.indexOf(-0) > -1, true);
assert.equal(includes(arr, 0), true);
assert.equal(includes(arr, -0), true);

assert.equal(arr.indexOf(NaN) > -1, false);
assert.equal(includes(arr, NaN), true);

assert.equal(includes(arr, 'foo', 0), true);
assert.equal(includes(arr, 'foo', 1), true);
assert.equal(includes(arr, 'foo', 2), false);
/* when Array#includes is not present */
delete Array.prototype.includes;
var shimmedIncludes = includes.shim();

assert.equal(shimmedIncludes, includes.getPolyfill());
assert.equal(arr.includes('foo', 1), includes(arr, 'foo', 1));
/* when Array#includes is present */
var shimmedIncludes = includes.shim();

assert.equal(shimmedIncludes, Array.prototype.includes);
assert.equal(arr.includes(1, 'foo'), includes(arr, 1, 'foo'));

Tests

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

idlecssObject.entriesprunees2015@@toStringTagsesstringifywarningIteratorcharactergetPrototypeOfsnskarmaArray.prototype.containses8emitfindLastIndexECMAScript 2015mkdirpECMAScript 2022WebSocketisConcatSpreadablees2018wafbluebirdmomentnames$.extendobjtoStringTagguiddayjsfseventsform-validationHyBisetPrototypeOfhttpjQueryroute53reducermiddlewarereplayfunctionalconfigESpathiterationmatches-0classnameregexjwtworkflowfigletoutputparseURLSearchParamsRegExp.prototype.flagsRFC-6455JSON-SchemaES5mrulanguageajaxless cssnegative zeroconsoleschemeTypeBoxArray.prototype.filtercharacterspatchchaiES2022monorepopolyfillwritablevariables in cssstyleguideelboperating-systemcoreomitprivateMicrosoftschemaflatMapincludessettypescripttypanionnodejskeyses2017weaksetcompile lesstypedarrayObservableparentslistenersutilargumentelasticachearrayupwalkterminalmovecensorclientasyncserializeequalityruntimewatchingYAMLecmascriptloadbalancingenvironments.envrouterttytypeastWeakSetthroataccessibilitysetImmediateECMAScript 2018sigintlinkauthelmwaitenvbootstrap lessuuidduplexpackage managerstringifierinputbundlingtestingnativejsmatchidfast-deep-clonesymlinkshardlinkshas-owntoArrayidentifiersworkspace:*cloudwatchforEachimportexportpackage.jsona11ystreamsextendinferencerapidwhatwgflagdeep-copybuffersuperagentpredictablevisualshebangexpressiontyped arrayinterruptstouchtestpostcss-plugintslibnested cssObject.isweakmapmkdirairbnbec2WeakMapdataviewsymlinkoptimizersearchwriteflagsmergehookscommandercallbounderror-handlingscheme-validationparsingsafetrimLeftfunctionschromeaccessorawesomesaucejshintopenjapaneseinstallsyntaxformkoreanfromveststringcode pointsless compilerparserpostcssArray.prototype.flatMapstatesorteslintconfiginspectrm -rfpropertyhastypeerrorlimitformatkeyuninstallinternal slotmodulelessurlgetintrinsics3requireserializationeventEmitterajvhasOwnwhichefficientlimitedObject.keyscloudtrailresolvemimeconfigurablePromisetoolsCSSnegativeserializerArrayBuffer#slicergbdeepcloneiamECMAScript 3typedarrayscreateclivarsclassesdescriptionAsyncIteratorprocessvaluespositivecollection.es6copyspeciteratorsigtermconcatMapbatchtrimRightshimvalidateECMAScript 2017awaitgetopteslintpluginworkerhookformrmframeworkURLapolloi18nexeccss lessspinnershellassignfindslotemojireadgraphqlthrottleprogressPushwindowspropertiesdependenciesbyteOffsethandlersCSSStyleDeclarationsuperstructObjecttddfast-clonecolumneast-asian-widthsignalstoragegatewayfunctionconnectcheck
5.9.113

1 year ago

5.9.112

1 year ago

5.9.111

1 year ago

5.9.110

1 year ago

5.9.109

1 year ago

5.9.108

1 year ago

5.9.107

1 year ago

5.9.106

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.30

1 year ago

1.1.34

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.38

1 year ago

3.8.82

1 year ago

1.1.37

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.39

1 year ago

3.6.74

1 year ago

1.1.41

1 year ago

2.5.59

1 year ago

1.1.40

1 year ago

3.6.73

1 year ago

3.6.72

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

2.5.60

1 year ago

5.8.90

1 year ago

4.8.83

1 year ago

4.8.82

1 year ago

4.8.85

1 year ago

4.8.84

1 year ago

2.5.69

1 year ago

5.9.105

1 year ago

5.9.102

1 year ago

3.5.72

1 year ago

2.5.65

1 year ago

1.5.58

1 year ago

5.9.101

1 year ago

2.5.66

1 year ago

1.5.57

1 year ago

5.9.104

1 year ago

2.5.67

1 year ago

5.9.103

1 year ago

2.5.68

1 year ago

1.5.59

1 year ago

2.5.61

1 year ago

2.5.62

1 year ago

5.9.100

1 year ago

2.5.63

1 year ago

2.5.64

1 year ago

5.8.85

1 year ago

5.8.86

1 year ago

5.8.87

1 year ago

2.5.70

1 year ago

5.8.88

1 year ago

2.5.71

1 year ago

1.3.43

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.3.44

1 year ago

1.1.21

1 year ago

5.8.89

1 year ago

2.5.72

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

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

3.7.74

1 year ago

1.2.43

1 year ago

3.7.82

1 year ago

3.7.80

1 year ago

3.7.81

1 year ago

1.4.44

1 year ago

1.4.46

1 year ago

1.4.45

1 year ago

1.4.48

1 year ago

1.4.47

1 year ago

1.4.49

1 year ago

5.9.97

1 year ago

5.9.98

1 year ago

5.9.99

1 year ago

5.9.93

1 year ago

5.9.94

1 year ago

5.9.95

1 year ago

5.9.96

1 year ago

5.9.90

1 year ago

5.9.91

1 year ago

5.9.92

1 year ago

1.4.51

1 year ago

1.4.50

1 year ago

1.4.53

1 year ago

1.4.52

1 year ago

1.4.55

1 year ago

1.4.54

1 year ago

1.4.57

1 year ago

1.4.56

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

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

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago