【文件属性】:
文件名称:clonehunter:用于比较对象的节点模块
文件大小:5KB
文件格式:ZIP
更新时间:2021-07-10 21:23:41
JavaScript
能够比较两个对象
// the hunter
var hunter = new CloneHunter({
fields: [
'firstname',
'lastname',
'gender',
'birthdate'
],
arrays: [
{ path: 'emails', fields: ['email'] }
]
});
var a = {
firstname: 'user',
lastname: 'a',
emails: [{email: 'a@kc.com'}]
};
var b = {
firstname: 'user',
lastname: 'a',
emails: [{email: 'a@kc.com'}]
};
// score: how equal
// fieldResult: a
【文件预览】:
clonehunter-master
----lib()
--------cloneHunter.js(4KB)
----test()
--------cloneHunter.spec.js(5KB)
--------cloneHunter.contact.spec.js(2KB)
--------mocha.opts(7B)
----.gitignore(431B)
----index.js(46B)
----readme.md(1KB)
----package.json(264B)