(value: unknown)
| 1783 | * @return the node type, or null if value is not a DOM node |
| 1784 | */ |
| 1785 | const _nodeTypeOf = function (value: unknown): number | null { |
| 1786 | if (!getNodeType || typeof value !== 'object' || value === null) { |
| 1787 | return null; |
| 1788 | } |
| 1789 | |
| 1790 | try { |
| 1791 | const nodeType = getNodeType(value as Node); |
| 1792 | return typeof nodeType === 'number' ? nodeType : null; |
| 1793 | } catch (_) { |
| 1794 | return null; |
| 1795 | } |
| 1796 | }; |
| 1797 | |
| 1798 | const _isDocumentFragment = function (value: unknown): boolean { |
| 1799 | return _nodeTypeOf(value) === NODE_TYPE.documentFragment; |
no outgoing calls
no test coverage detected