An open API service indexing awesome lists of open source software.

https://github.com/hacknlove/isdifferent

function that returns true if their two parameters are deeply different
https://github.com/hacknlove/isdifferent

deep-difference deep-equals helper helper-functions

Last synced: 4 months ago
JSON representation

function that returns true if their two parameters are deeply different

Awesome Lists containing this project

README

        

# isDifferent
![test coverage 100%](https://img.shields.io/badge/test_coverage-100%25-brightgreen)
![dependencies 0](https://img.shields.io/badge/dependencies-0-brightgreen)
![minified size 0.4k](https://img.shields.io/badge/minified_size-0.4k-brightgreen)

Check deep equality of two variables

## browser
### script
```html

isDifferent.isDifferent('bar', 'foo') // true
isDifferent.isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false

```

### module
```html

import { isDifferent } from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/isDifferent.esm.min.js'

isDifferent('bar', 'foo') // true
isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false

```

## node (and browser with some bundler)
```
npm i isdifferent
```
```javascript
import { isDifferent } from 'isdifferent'
// or // const { isDifferent } = require('isdifferent')

isDifferent('bar', 'foo') // true
isDifferent({response: 42, question: 'unknown'}, {question: 'unknown', response: 42}) // false
```