5.11.109 • Published 12 months ago

@diotoborg/itaque-suscipit v5.11.109

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@diotoborg/itaque-suscipit Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Are these two values conceptually equal?

Example

var isEqual = require('@diotoborg/itaque-suscipit');
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('@diotoborg/itaque-suscipit/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

environmenttoSortedinspecttdderrorassertsidfigletcharactersaccessorpreprocessorpipenegative zerofileflattencloudsearchRxJSeslintconfigargses6lookstoragegatewaypushes-shim APIcachetypeofdragtelephonextermES2021jshintexpressionmergeproxyacornsyntaxerrorwalkchairequiretypedarrayaccessibility256colorsreusefantasy-landnamematchAllfnmatchclassespromiseCSSECMAScript 2020ansireadprunejavascriptawsparentsmkdirplogidentifierskoreanglobalsfastcloneES2020gitignoredescriptionendpointcurriedroutegroupform-validationMaphasOwnutilsdataviewcss-in-jsrecursiveObject.assignmochasimpledbenvArray.prototype.flattenquerydeepclonepackagesfpvariablesescloudfrontwindowtypedarraysfunctionsRxoptimisttestingformincludesspawnbinECMAScript 2021jsonschemaglobal this valuereadablestreamfunction.lengtharktypedeep-copyequalitysource mapzxfast-cloneoutputspinnersanimationYAMLloggermaptostringtagnodejssameValueZeroworkeres5react-hooksreal-timecurlsesjsdomestreesinatraprefixinternalbeanstalkdebugmulti-packagecoercibleimportexportapollomoveenumerablestructuredClonetestermodulemonoreposyntaxhigher-orderjsdiffexecfilezodexecutelinkinferencesettingsintrinsiccompilerdeep-cloneRegExp.prototype.flagsl10nframerzeropackage.jsonvalidvisualstringvpctoolscompareES8makermdirprotobufroutingvaluesletlockfilePromiseexpressprogresstransformmake dirTypeScriptstyled-componentspackageinstrumentationprotocol-buffersfast-deep-clonepositiveArrayBuffer.prototype.slicechineseObject.keysSetmobiletypedirectorystringifiercoveragehookformArray.prototype.flatMapchromeArray.prototype.includessortedwarningruntimeECMAScript 2023es2017httpECMAScript 2018queuesuperagentES2017class-validatorflagfilterresolvenegativesearchconstcloudformationespreeperformanceeslint-pluginshellECMAScript 2022childmkdireventEmitterwriteposeslotquerystringmanipulationes2015patchhasOwnPropertybrowserlistdependenciesfastifyESnextasserteslintpluginramdatoReversedstringify_.extendselfyamltrimLeftcode pointstakeieimmerasync-0streamsresttscore-jsargumenta11ywalkingrandomplugincircularbabelspeedPushoptimizerforkcjkgetPrototypeOfuuiddependency managerpyyamlsafehttpsjsxasciirsspathdateistanbulcodesTypedArraysnsstabledescriptores8schemaviewrm -frfind-upttyECMAScript 6iteratecomputed-typesautoprefixerautoscalingboundmatchutilitynativetyped arraycolumnes2018waitcorereact-hook-formtoArrayregular expressionsregular-expressiondropfastcopyRegExp#flagsdefineObject.fromEntriesbufferArray.prototype.findLastIndexindicatoruninstallbuffersserializationInt16ArrayhelpermomentStyleSheetes-abstractises-shimsemrremovedomcall-bindpolyfillIteratorES2016workflowperformantES2022datainstallerESrfc4122groupByReactiveExtensionskeysrmcheckformsinput3dcollectionArrayunicodelanguagetranspilersetPrototypeOfes7package managerfast-deep-copyconfigES3colourloadbalancingregexpextraECMAScript 2015touchdataViewrequestmkdirsreversedeast-asian-widthArray.prototype.filterweakmapspinnerUint16ArrayregulararraybufferbrowsersubprocessinstallquotejsonES2015ObservablesatomnpmonceUint8ArrayshambusybundlingcolorcolumnsponyfillJSON-SchemainreversefindLastIndexajaxgetpnpm9json-schemalisteners
5.11.109

12 months ago

5.11.108

12 months ago

5.11.107

1 year ago

5.11.106

1 year ago

5.11.105

1 year ago

5.11.104

1 year ago

5.11.103

1 year ago

5.11.102

1 year ago

5.11.101

1 year ago

5.11.100

1 year ago

5.11.99

1 year ago

5.10.99

1 year ago

5.10.98

1 year ago

5.10.97

1 year ago

5.10.96

1 year ago

5.10.95

1 year ago

5.10.94

1 year ago

5.10.93

1 year ago

5.9.93

1 year ago

5.9.92

1 year ago

5.9.91

1 year ago

5.9.90

1 year ago

5.9.89

1 year ago

5.9.88

1 year ago

5.9.87

1 year ago

5.9.86

1 year ago

4.9.86

1 year ago

4.9.85

1 year ago

4.9.84

1 year ago

4.8.84

1 year ago

3.8.84

1 year ago

3.8.83

1 year ago

3.8.82

1 year ago

3.8.81

1 year ago

3.8.80

1 year ago

3.8.79

1 year ago

3.8.78

1 year ago

3.8.77

1 year ago

3.8.76

1 year ago

3.7.76

1 year ago

3.7.75

1 year ago

3.7.74

1 year ago

3.7.73

1 year ago

3.7.72

1 year ago

3.7.71

1 year ago

3.7.70

1 year ago

3.7.69

1 year ago

3.7.68

1 year ago

3.7.67

1 year ago

3.7.66

1 year ago

3.7.65

1 year ago

3.7.64

1 year ago

3.7.63

1 year ago

3.7.62

1 year ago

3.7.61

1 year ago

3.7.60

1 year ago

3.7.59

1 year ago

3.7.58

1 year ago

3.7.57

1 year ago

3.7.56

1 year ago

3.7.55

1 year ago

3.7.54

1 year ago

3.6.54

1 year ago

3.6.53

1 year ago

3.6.52

1 year ago

3.6.51

1 year ago

3.5.51

1 year ago

3.5.50

1 year ago

3.5.49

1 year ago

3.5.48

1 year ago

3.5.47

1 year ago

3.5.46

1 year ago

3.5.45

1 year ago

3.5.44

1 year ago

3.5.43

1 year ago

3.5.42

1 year ago

3.5.41

1 year ago

3.5.40

1 year ago

3.5.39

1 year ago

3.4.39

1 year ago

3.4.38

1 year ago

3.4.37

1 year ago

3.4.36

1 year ago

3.4.35

1 year ago

3.4.34

1 year ago

3.3.34

1 year ago

3.3.33

1 year ago

3.3.32

1 year ago

3.3.31

1 year ago

3.3.30

1 year ago

3.3.29

1 year ago

3.3.28

1 year ago

3.3.27

1 year ago

3.3.26

1 year ago

3.2.26

1 year ago

3.2.25

1 year ago

3.2.24

1 year ago

3.2.23

1 year ago

2.2.23

1 year ago

2.2.22

1 year ago

2.2.21

1 year ago

2.2.20

1 year ago

2.2.19

1 year ago

2.2.18

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.2.15

1 year ago

2.2.14

1 year ago

2.2.13

1 year ago

2.2.12

1 year ago

2.2.11

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6

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

1 year ago

1.0.0

1 year ago