1.0.0 • Published 12 days ago

@landmineaknpm/officia-nesciunt-temporibus v1.0.0

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

@landmineaknpm/officia-nesciunt-temporibus Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Are these two values conceptually equal?

Example

var isEqual = require('@landmineaknpm/officia-nesciunt-temporibus');
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('@landmineaknpm/officia-nesciunt-temporibus/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

utilescapeconfighashtypedarrayfsobjlogexit-codettyoptimistsetImmediatequerystringcolourkarmauuidclassesidvareslintmacosflagsutil.inspectless.jstostringtagtakesymboltaskgenericsbindvalidshellslotclientBigInt64Arrayvisualprunemkdirpchannelfetchgradients csses-shim APIlibphonenumberEShookformES2017yupaccessibilitycallback-0signalsserializetelephoneAsyncIteratorlengthencryptionrfc4122redactjapanesebyteLengthRegExp.prototype.flagsmodulesdeletecryptgetintrinsicreusedeepcopyfastidleindicatorchromewriteRegExp#flagscoerciblecodesreal-timewebthroatpushflatthreetouchwarningform-validationjsdomspawnArray.prototype.findLastIndexmaplettypeddotenvInt16Arrayprettycircularmiddlewarefromxdgdeep-copy.envvalidatergbmergesometrimStartconsumemonorepofseventscolumnssetPrototypeOffilesymbolsjQuerybluebirdes-abstractoffsetextralesscopysearchloggerRxhas[[Prototype]]Array.prototype.containsinvariantregular expressionwatches8immutableparsenpmpatchrandomreact-hook-formtrimRightstylingnegativeES2021jasmineES5mimetrimLeftcore-jsassertionforEachdescriptorsgroupByES2019debuggerzeroFloat64Array6to5StyleSheetconnectTypedArrayflattenwebsitelinuxlimitsanitizeietrimEndsidepolyfillhigher-orderstructuredClonewindowsglobeditorentriespostcssObjectcommand-linepopmotionargumenttestObject.valueschromiumpyyamlJSONpromisetyped arrayweakmapponyfillunicodeWeakMapspringfantasy-landInt32ArrayelectronCSSECMAScript 2018browserdependenciesarraybufferstylesheetjsdiff256deepcloneterminalmruHyBigraphqlMicrosoftSymbol.toStringTagesObject.fromEntriesdomdatastructurefastifySetArray.prototype.flattraverserequestreadablejavascriptshrinkwrapa11yestreebannerhasOwncmdECMAScript 2015streamenderinternalrequiresymlinkslookpackage managervaluebundlerlesscssresolveajvthrottletoolkitextension_.extendstartes-shimsregexObject.assignxssObject.keysrapidregexpString.prototype.trimiteratorUint16Arrayvariableshelperscss nestingcallbounddataViewstringifierincludeseast-asian-widthcommanderfullwidthgetOwnPropertyDescriptorUint8ArrayjsonschemadirfpformatapilimitedlinewrapfastcloneurlsYAMLflages5cssreact-testing-libraryapolloslicetypesafeequalless compilerconsoleinspectes7internal slotutilitiesastansicurlPushcss less__proto__mixinsdefinewaapiajaxeslintconfigconcatMapjswatcherhooksfigletpropertiesprotocol-buffersECMAScript 6xtermURLopenmime-dbpoint-freeanimationReactiveExtensionspathStreames2017ECMAScript 2021argspuresequencecorsuser-streamsfindLastlanguagewhatwgECMAScript 7isConcatSpreadablesortedfile systemoperating-systemcallopensarrayfast-deep-clonedeepquoteeslintpluginserializerstyleguiderangeerrorcurriedpnpm9getterdiffes2016private dataequalitycliobjectpackagesguidratejsonpathtoArrayargparseprivatelinkES2018ES3loadingES8RxJSstreams2stringifyvestsharedarraybufferjson-schema-validatorrm@@toStringTagreactmkdirstesterassertnativeutilsmakehandlersemitreadtesting
1.0.0

12 days ago