check-equal
This is a Javascript library to check two objects whether equal (includes type), object can be array/string/number/JSON/function, etc.
Install
-
npm
npm install check-equal --save -
yarn
yarn add check-equal --save
Change Logs
- v1.0.0 - v1.0.3: First published version, it can be used in frontend
- v1.0.4 - v1.0.6: Updated webpack config, now it can be used in frontend and backend
- V1.0.7: Update
hasOwnProperty
judgement
Usage
-
Import
-
-
Require
const checkEqual =
Example
//Check two numbers //true //false //true //Check two strings //true //false //false //Check different types //false //false //Check two booleans //true //false //Check two arrays (will sort array items automatically, ignore the array which has different types) //true //true //false (different length) //true //true //false //Check two Objects //true //true //false //false //false //false