当前位置: 首页 > 工具软件 > Fast-ismartx > 使用案例 >

fast-deep-equal深比较

龚凯泽
2023-12-01
npm install fast-deep-equal

var equal = require('fast-deep-equal');
console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true

//支持es6 map set 类型化素组
var equal = require('fast-deep-equal/es6');
console.log(equal(Int16Array([1, 2]), Int16Array([1, 2]))); // true

//搭配react使用
var equal = require('fast-deep-equal/react');
var equal = require('fast-deep-equal/es6/react');
 类似资料: