(a: any, b: any)
| 11 | } |
| 12 | |
| 13 | export function deepEqual(a: any, b: any): boolean { |
| 14 | if (a === b) { |
| 15 | return true; |
| 16 | } else if (!a || !b) { |
| 17 | return false; |
| 18 | } else { |
| 19 | try { |
| 20 | if (a.prototype !== b.prototype || (Array.isArray(a) && Array.isArray(b))) { |
| 21 | return false; |
| 22 | } |
| 23 | return JSON.stringify(a) === JSON.stringify(b); |
| 24 | } catch (e) { |
| 25 | return false; |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | export function isAnchor(el: (Node & ParentNode) | Element | null): el is HTMLAnchorElement { |
| 31 | return (<HTMLAnchorElement>el).href !== undefined; |
no test coverage detected
searching dependent graphs…