Displaying 1 to 20 from 24 results

go-cmp - Package for comparing Go values in tests

  •    Go

This package is intended to be a more powerful and safer alternative to reflect.DeepEqual for comparing whether two values are semantically equal.When the default behavior of equality does not suit the needs of the test, custom equality functions can override the equality operation. For example, an equality function may report floats as equal so long as they are within some tolerance of each other.

node-deep-equal - node's assert.deepEqual algorithm

  •    Javascript

Node's assert.deepEqual() algorithm as a standalone module.This module is around 5 times faster than wrapping assert.deepEqual() in a try/catch.

shallow-equals - Determine if an array or object is equivalent with another, *not* recursively

  •    Javascript

Determine if an array or object is equivalent with another, not recursively.Check if a and b are pretty much the same thing. Note this won't be the case if a and b are different types (e.g. Array vs. Object, String vs. Function).

core-assert - Node.js `assert` as a standalone module

  •    Javascript

Useful to ensure consistency between Node.js versions as the assert module has changed a lot.Lets you use the Node.js 4.0 assert.deepStrictEqual()/assert.notDeepStrictEqual() methods all the way back to Node.js 0.10.




deep-strict-equal - Test for deep equality - Node

  •    Javascript

Test for deep equality - Node.js `assert.deepStrictEqual()` algorithm as a standalone module

univeq - Safer universal equivalence (==) for Scala.

  •    Scala

Created: Feb 2015. Open-Sourced: Apr 2016. This means that you can perform nonsensical comparisons that, at compile-time, you know will fail.

equals - Check if two values are deeply equivalent

  •    Javascript

equal takes as many arguments as you like of any type you like and returns a boolean result. Primitive types are equal if they are ===. While composite types, i.e. Objects and Arrays, are considered equal if they have both the same structure and each sub-value is also equal. Circular references in composite structures are supported.

is-equal-shallow - Does a shallow comparison of two objects, returning false if the keys or values differ

  •    Javascript

Does a shallow comparison of two objects, returning false if the keys or values differ. The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives.


node-deeper - slightly better structural equality testing

  •    Javascript

deeper is a library for structurally comparing the equality of JavaScript values. It supports recursive / cyclical data structures, is written to avoid try / catch / throw (for speed), and has no dependencies by default. If you're running Node 0.12+ or io.js, deeper will use the built-in Buffer.equals(). If you're running an older version of Node and you install Ben Noordhuis's buffertools into a project using deeper, it will use that to speed up comparison of Buffers. This used to be installed as an optional dependency, but it gets in the way of browserification and also makes using deeper in your own projects harder, so I changed it to just try to use it if it's there.

jseq - test suite for testing shallow & deep, strict equality as provided by various libraries

  •    CoffeeScript

The gist of the comparison policy of deep-equal-ident is this: for two objects foo, bar to be deeply equal, we should expect that they contain deeply equal values at the same indices. now, if we inspect foo and bar, we find that both objects in both cases do have x[ 0 ][ 0 ] == 1, x[ 0 ][ 1 ] == 2, x[ 1 ][ 0 ] == 1, and so on, so at a glance, foo and bar should be considered deeply equal. Does equality still hold or has it been violated? Indeed, the latter is the case: when we say foo[ 1 ][ 0 ] += 1, we're really doing a[ 0 ] += 1, since foo[ 1 ] is a (foo[ 1 ] is identical to a). But a is also referenced as the first element of foo, so foo[ 0 ] changes along with foo[ 1 ], which means foo is now [ [ 2, 2, 3, ], [ 2, 2, 3, ], ].

is-equal - Are these two values conceptually equal?

  •    Javascript

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

object-is - ES6-compliant shim for Object

  •    Javascript

ES6-compliant shim for Object.is - differentiates between -0 and +0, and can compare to NaN. Essentially, Object.is returns the same value as === - but true for NaN, and false for -0 and +0.

leibniz - Leibniz equivalence and Liskov substitutability library for Scala.

  •    Scala

This library provides an encoding of Leibniz' equality and other related concepts in Scala. See my impromptu LC 2018 presentation for an overview. Code is provided under the MIT license available at https://opensource.org/licenses/MIT, as well as in the LICENSE file.

approx - Approximate floating point equality comparisons and assertions

  •    Rust

Approximate floating point equality comparisons and assertions for the Rust Programming Language.

shallowequal - Like lodash v3.x isEqualWith but for shallow equal.

  •    Javascript

shallowequal is like lodash's isEqualWith but for shallow (strict) equal. Performs a shallow equality comparison between two values (i.e. value and other) to determine if they are equivalent.

equatable - Simplify Equality Comparisons | A Dart abstract class that helps to implement equality without needing to explicitly override == and hashCode

  •    Dart

Being able to compare objects in Dart often involves having to override the == operator as well as hashCode. Not only is it verbose and tedious, but failure to do so can lead to inefficient code which does not behave as we expect.

Comparers - The last comparison library you'll ever need!

  •    CSharp

The last comparison library you'll ever need! For netstandard1.0 (including .NET 4.5, .NET Core 1.0, Xamarin.iOS 10, Xamarin.Android 7, Mono 4.6, Universal Windows 10, Windows 8, Windows Phone Applications 8.1, and Windows Phone Silverlight 8.0). Install the NuGet package. By default, this includes the extension package for LINQ support. There are also extension packages available for Reactive extensions and Interactive extensions support.

Generator

  •    CSharp

A source code generator for automatically implementing IEquatable<T> using only attributes. The below sample shows how to use Generator.Equals to override the default equality implementation for a C# record, enhancing it with the ability to determine the equality between the array contents of the record.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.