5.13.93 • Published 1 year ago

@taktikorg/eius-reprehenderit v5.13.93

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

@taktikorg/eius-reprehenderit Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Are these two values conceptually equal?

Example

var isEqual = require('@taktikorg/eius-reprehenderit');
var assert = require('assert');

var primitives = [true, false, undefined, 42, 'foo'];
primitives.forEach(function (primitive) {
	assert.equal(isEqual(primitive, primitive), true);
});
assert.equal(isEqual(/a/g, /a/g), true);
assert.equal(isEqual(/a/g, new RegExp('a', 'g')), true);
assert.equal(isEqual({ a: 2 }, { a: 2 }), true);
assert.equal(isEqual([1, [2, 3], 4], [1, [2, 3], 4]), true);
var timestamp = Date.now();
assert.equal(isEqual(new Date(timestamp), new Date(timestamp)), true);

Want to know why two values are not equal?

Will return an empty string if isEqual would return true - otherwise will return a non-empty string that hopefully explains the reasoning.

var whyNotEqual = require('@taktikorg/eius-reprehenderit/why');

assert.equal(whyNotEqual(1, 1), '');
assert.equal(
  whyNotEqual({ a: 1 }, { a: 2 }),
  'value at key "a" differs: numbers are different: 1 !== 2'
);

Tests

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

objECMAScript 6plugintrimvarfunction.lengthecmascriptcommanderurloptionlengthArray.prototype.flattenyupincludestypesafeES2023json-schema-validationpropertiesclitoStringTag[[Prototype]]censorkarmaset__proto__RxJScopycompilersesstringifierhttpses-shim APIsameValueZerojshintbrowserlistespreedomargsdatautilitiesmetadatareact-testing-librarydotenvcall-bindcloudtrailpatchTypeBoxvalidshimutilwaiteslintECMAScript 2015styled-componentsTypeScriptglobal this valuepipebanneres8Microsoftsharedcollectionfind-uprequireparentsutilitysnsfnmatchdeep-copylook-upFloat64Arraymulti-packagerm -rfserializationzxpreprocessorwafvisualdescriptoriedependency managerbinpackage.jsoneventsatomstreamsinatraprettytslibMapbundlingtypeofelectrondeep-cloneprocessgetintrinsicmonorepoprivate datasortbyteOffsetparentavagdprconfigurablediffformformattingpackage managerstringdeepcopyreal-timeprunestreamsIteratorECMAScript 2018effect-tsgroupBycommandjQueryflattencallbound$.extendowngetOwnPropertyDescriptorglobalThistypescore-jshardlinkssetPrototypeOfendpointvarsairbnbrestfulqscoercibletypedarraysReactiveXweaksetes5code pointsPromisegetPrototypeOfexecflatMapECMAScript 3pinoinferencepuremapio-tstypedcolumnsbuffernpmmomenteskinesisexpressionchildobjectansidataViewpnpm9managerglobal objectrminec2languageES2021autoprefixeremitjestremoveiterateshrinkwrapprototypewalkObject.fromEntriesreusegetterl10nes-abstractthreeisObject.valuesarraysexpressframeworkemrglobtermtraversefunctionscheckjsonschemaInt8ArrayprefixstringifyreducehashtranspileObjectStyleSheetsomesqsasciidropassertionfolderhigher-orderrandombinaryAsyncIteratorsearchreactcommand-linelocationtsenvoptimizerfileclonemrufast-deep-clonesyntaxargvWeakMapInt32Arrayfindfast-copydirregexpflagArrayBuffer#slicedayjshasOwnPropertyshebangspringargumenttimeprogressRegExp#flagspackagetoolkitdescriptionuser-streamsbindframerreact-hook-formArrayBuffer.prototype.slicekeysnameslockfilecloudformationfindLastIndexsyntaxerrorelbprotocol-buffersbabel-core.envexecfileUnderscorereact-hooksimmercallbackagenttoobjectconcatES5javascripttrimStartrfc4122chromerulesnopeinstrumentationES2019validatepathreworkrequestcodesclassnamesfast-deep-copyoffsetcorenegativecolorsregular expressionsregular-expressionhelperworkertypanionregularenumerableunicodeconstArray.prototype.findLastfunctionaljson-schema-validatorslicelruES8whatwgarraybufferchannelvalidatorpopmotionidnumbertouchglobalssymbolsindicatorlistenersxmlpostcss-plugintranspilerHyBireadclass-validatorfull-widthES2020appbabelaccessorconfigreact animationinstallignoreBigInt64Arraynametacitpushzodjapanesepicomatchposees2016ES2022WebSocketsasterisksreduxprotomapreducegraphqlfantasy-landtoSortedregexassigndefinePropertymanipulationdependenciescoloursymlinksawsarrayeslintconfigtaptexttyped arrayPushlocaleverystylesfeedapollostarterparsees7selftestingbytewhichinstallerserializererrorjsonruntimeRFC-6455guidemojiBigUint64ArraycurrieddeepclonemoveglaciercallebsWebSocketsetterelasticacheletbuffersenderwgetspinnersimmutableloggertypeerrormatchAllfullwidthtc39rangeerrorterminalefficientfastclone@@toStringTaglogginghtmles2015joidatetelephone_.extendresolveextraasynctakeentriesgetoptdeletedebuggerArray.prototype.containsautoscalingeslint-pluginarktyperm -frmobiledefinefastcjktddestreepropObject.definePropertyperformantTypedArrayscheme-validationRegExp.prototype.flagsinspectUint8ClampedArraySymbolstylinghookformsource mapconcatMaproutingObject.keysfile systemassertECMAScript 2021Array.prototype.filterformsUint32Arrayaccessibilitya11yboundSetstablevestjsdifftransformFunction.prototype.namematchpositivetestArray.prototype.findLastIndeximportform-validationrapidStreamfixed-width6to5fullESnodejsrobustReflect.getPrototypeOfclassnamevalidationbyteLength-0beanstalkECMAScript 5trimRightmkdirsidletesterbusyeventEmitterbundlerstoragegatewayreversedreverseredactanimationroute53viewschemaYAMLcurlgroupURLSearchParamsomitxhrmochalookArray.prototype.flatMapcacheObservableimportexportschemeES6queuevaluevpcArray.prototype.includesdirectoryhelpersnodetypedarrayfast-cloneECMAScript 2022rssObject.assignistanbulUint8ArrayvariablesnpmignoreObject.getPrototypeOfmake dirawesomesauceshellforkhasreadablestreamlinkcreatepackagesObject.isnativecloudfrontoptimistdataviewArrayBuffercoverageclassesconsoleECMAScript 2017i18nutilscharactersuperagentgitignoretty256onceString.prototype.trimfetchhooksES2018lintfindLastcryptorestregular expressioncssECMAScript 2016equalityajvESnextes2018chromiumjson-schemajsxsidespawnmkdirreducerSymbol.toStringTagmodulebdddescriptorstransportperformancedeterministicrouterbrowserupES2015routedom-testing-libraryapidrag0formatswfenvironmentsJSONES7clienteventDispatcherpoint-freermdirObservablesfigletconsumeutil.inspectwarningvaluesspeedexecuteCSSmakeserializemkdirpstructuredCloneinternalwidthgenericsqueueMicrotaskoutputlibphonenumberloadbalancingsimpledbamazongesturestoolsprotobufECMAScript.gitignoreforEachcallbindtostringtagkeyuuidjscomputed-typesfastcopyreact poseshamJSON-Schemamodulesiams3binarieses2017east-asian-widthes-shimsSystem.globalrecursivehasOwnequalyamlinternal slotextendfilterescapebrowserslistECMAScript 7css-in-jsObject.entriesastcollection.es6weakmapcircularphonerdses6URLcompareinvariantminimalReactiveExtensionswebfunctionacornjsdompyyamlstyleguidecontainssortedString.prototype.matchAllUint16ArrayspinneruninstallcloudwatchflagsfindupstyleiteratorCSSStyleDeclarationtrimLeftponyfillsubprocessharmonycloudsearchinputworkspace:*flatcoloridentifierswriteES3
5.13.93

1 year ago

5.13.92

1 year ago

5.12.92

1 year ago

5.12.91

1 year ago

5.12.90

1 year ago

5.12.89

1 year ago

5.11.89

1 year ago

5.11.88

1 year ago

5.11.87

1 year ago

5.11.86

1 year ago

5.11.85

1 year ago

5.11.84

1 year ago

5.11.83

1 year ago

4.11.83

1 year ago

4.11.82

1 year ago

4.11.81

1 year ago

4.11.80

1 year ago

4.11.79

1 year ago

4.11.78

1 year ago

4.11.77

1 year ago

4.11.76

1 year ago

4.11.75

1 year ago

4.11.74

1 year ago

4.11.73

1 year ago

4.11.72

1 year ago

3.11.72

1 year ago

3.11.71

1 year ago

3.11.70

1 year ago

3.11.69

1 year ago

3.11.68

1 year ago

3.11.67

1 year ago

3.11.66

1 year ago

2.11.66

1 year ago

2.10.66

1 year ago

2.10.65

1 year ago

2.9.65

1 year ago

2.9.64

1 year ago

2.8.64

1 year ago

2.8.63

1 year ago

2.8.62

1 year ago

2.8.61

1 year ago

2.8.60

1 year ago

2.8.59

1 year ago

2.7.59

1 year ago

2.7.58

1 year ago

2.7.57

1 year ago

2.7.56

1 year ago

2.7.55

1 year ago

2.7.54

1 year ago

2.7.53

1 year ago

2.7.52

1 year ago

2.7.51

1 year ago

2.7.50

1 year ago

2.7.49

1 year ago

2.7.48

1 year ago

2.7.47

1 year ago

2.7.46

1 year ago

2.7.45

1 year ago

2.7.44

1 year ago

2.7.43

1 year ago

2.7.42

1 year ago

2.7.41

1 year ago

2.7.40

1 year ago

2.7.39

1 year ago

2.7.38

1 year ago

2.7.37

1 year ago

2.7.36

1 year ago

2.7.35

1 year ago

2.7.34

1 year ago

2.7.33

1 year ago

2.7.32

1 year ago

2.7.31

1 year ago

2.7.30

1 year ago

2.6.30

1 year ago

2.6.29

1 year ago

2.6.28

1 year ago

2.6.27

1 year ago

2.5.27

1 year ago

2.5.26

1 year ago

2.5.25

1 year ago

2.4.25

1 year ago

2.4.24

1 year ago

2.4.23

1 year ago

2.4.22

1 year ago

2.4.21

1 year ago

2.4.20

1 year ago

2.4.19

1 year ago

2.4.18

1 year ago

2.3.18

1 year ago

2.3.17

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

1 year ago

1.3.11

1 year ago

1.3.10

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

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

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago