How to use the @reshadow/utils/html-tags.has function in @reshadow/utils

To help you get started, we’ve selected a few @reshadow/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lttb / reshadow / packages / react / index.js View on Github external
export function jsx() {
    const args = Array.prototype.slice.call(arguments);
    let element = args[0];
    if (typeof element === 'string' && !tags.has(element)) {
        args[0] = 'div';
    } else if (typeof element === 'function') {
        element = getDisplayName(element);
    }
    args[1] = map(element, args[1]);
    return React.createElement.apply(null, args);
}

@reshadow/utils

reshadow utils package

MIT
Latest version published 2 years ago

Package Health Score

49 / 100
Full package analysis

Similar packages