mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-23 17:07:49 +08:00
12 lines
314 B
TypeScript
12 lines
314 B
TypeScript
/**
|
|
* Check if object1 includes object2
|
|
* @param object1 Object
|
|
* @param object2 Object
|
|
*/
|
|
export default function objectIncludes(object1: { [key: string ]: any }, object2: { [key: string ]: any }): boolean {
|
|
return !!Object
|
|
.keys(object2)
|
|
.filter(key => object2[key] === object1[key])
|
|
.length
|
|
}
|