0.1.2 • Published 8 years ago

deepy v0.1.2

Weekly downloads
30
License
-
Repository
github
Last release
8 years ago

Deepy

Build Status

A fast algorithm for value comparison and equality of value types.

It's build for performance, and supports ES6 primitives among other things.

Loosely based on algorithms from NodeJS, Jasmine, Lodash and others.

Install

$ npm install --save deepy

Usage

Returns either true or false depends if the values are the same according to the algorithm or not.

let deepy = require('deepy')

deepy({a: 0}, {a: false}) // false
deepy(['a'], {0: 'a'}) // false
deepy({a: 1}, {a: 1}) // true
deepy('/a/igmm', '/a/igm') // false
deepy(
    [
        {foo: {z: 100, y: 200, x: 300}},
        'bar',
        11,
        {baz: {d: 4, a: 1, b: 2, c: 3}}
    ],
    [
        {foo: {z: 100, y: 200, x: 300}},
        'bar',
        11,
        {baz: {d: 4, a: 1, b: 2, c: 3}}
    ]
) // true
0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.11.2

8 years ago