How to use the @hint/utils-compat-data.getFriendlyName function in @hint/utils-compat-data

To help you get started, we’ve selected a few @hint/utils-compat-data 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 webhintio / hint / packages / hint-compat-api / src / utils / browsers.ts View on Github external
export const formatUnsupported = (browser: string, versionAdded?: string, versionRemoved?: string): string => {
    const browserName = getFriendlyName(browser);

    if (versionAdded && versionRemoved) {
        return `${browserName} ${versionRemoved}-${versionAdded}`;
    } else if (versionAdded) {
        return `${browserName} < ${versionAdded}`;
    } else if (versionRemoved) {
        return `${browserName} ${versionRemoved}+`;
    }

    return browserName;
};