1.0.8 • Published 4 years ago

@sahilpurav/ts-is-browser-supported v1.0.8

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
4 years ago

CircleCI

(TSLint) Browser support compatibilty check

Introducing super slick browser compatibility check module, built on the top of reliable MDN database.

Installation

  • Install the plugin with following command: npm i @sahilpurav/ts-is-browser-supported --save-dev
  • Open tslint.json and add code inside rulesDirectory option, "node_modules/@sahilpurav/ts-is-browser-supported/dist" For Angular project, it should look like this: "rulesDirectory": ["codelyzer", "node_modules/@sahilpurav/ts-is-browser-supported/dist"],

Usage

Following is the schema needed to add inside tslint.json:

"rules": {
    "ts-is-browser-supported": {
        "options": {
            "targets": {
                "ie": 11,
                "chrome": 60,
                "safari": 10,
                "firefox": 60
            },
            "whitelist": [
                "Promise",
                "Promise.*",
                "Object.assign",
                "Array.from",
                "Array.find",
                "Set.add",
                "Set",
                "String.startsWith",
                "String.endsWith",
                "Array.fill",
                "String.repeat",
                "HTMLElement.style"
            ]
        }
    }
}

Options

  • targets - It contains the minimum browser name and minimum supported version.
  • whitelist - If you've added polyfills for some unsupported function and you want to exclude this from the checks, you can it inside the whitelist section.
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago