(value: unknown)
| 1980 | * @return the node type, or null if value is not a DOM node |
| 1981 | */ |
| 1982 | const _nodeTypeOf = function (value: unknown): number | null { |
| 1983 | if (!getNodeType || typeof value !== 'object' || value === null) { |
| 1984 | return null; |
| 1985 | } |
| 1986 | |
| 1987 | try { |
| 1988 | const nodeType = getNodeType(value as Node); |
| 1989 | return typeof nodeType === 'number' ? nodeType : null; |
| 1990 | } catch (_) { |
| 1991 | return null; |
| 1992 | } |
| 1993 | }; |
| 1994 | |
| 1995 | const _isDocumentFragment = function (value: unknown): boolean { |
| 1996 | return _nodeTypeOf(value) === NODE_TYPE.documentFragment; |
no outgoing calls
no test coverage detected