UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

15 lines (14 loc) 418 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDisplayInline = void 0; /** * Return whether an element is `display: inline` */ function isDisplayInline(element) { if (element.nodeType === 3) { return true; } const computedStyle = window.getComputedStyle(element); return computedStyle.display === 'inline'; } exports.isDisplayInline = isDisplayInline;