{"ava":{"failFast":false,"files":["dist/tests/**/*.js","!dist/tests/**/fixtures/**/*.js"],"timeout":"1m","workerThreads":false},"dependencies":{"@hint/utils-css":"^1.0.12","@mdn/browser-compat-data":"^4.1.10","mdn-data":"^2.0.27","postcss-selector-parser":"^6.0.8","postcss-value-parser":"^4.2.0","semver":"^7.3.5"},"description":"hint tools","devDependencies":{"@typescript-eslint/eslint-plugin":"^4.33.0","@typescript-eslint/parser":"^4.33.0","ava":"^4.0.1","copyfiles":"^2.4.1","eslint":"^7.32.0","eslint-plugin-import":"^2.26.0","eslint-plugin-markdown":"^2.2.1","npm-run-all":"^4.1.5","nyc":"^15.1.0","rimraf":"^3.0.2","typescript":"^4.5.5"},"homepage":"https://webhint.io/","keywords":["hint","hint-utils","tools","utils","webhint"],"license":"Apache-2.0","main":"./dist/src/index.js","name":"@hint/utils-compat-data","nyc":{"extends":"../../.nycrc"},"peerDependencies":{},"repository":{"directory":"packages/utils-compat-data","type":"git","url":"git+https://github.com/webhintio/hint.git"},"scripts":{"ava":"ava","build":"npm-run-all build:*","build-release":"npm run clean && npm run prebuild && npm run build:assets && tsc --inlineSourceMap false --removeComments true","build:assets":"copyfiles \"./{src,tests}/**/{!(*.ts),.!(ts)}\" dist","build:ts":"tsc -b","clean":"rimraf dist","lint":"npm-run-all lint:*","lint:dependencies":"node ../../scripts/lint-dependencies.js","lint:js":"eslint . --cache --ext .js,.md,.ts --ignore-path ../../.eslintignore","lint:md":"node ../../scripts/lint-markdown.js","prebuild":"npm-run-all prebuild:*","prebuild:mdn-bcd":"node ./scripts/mdn-browser-compat-data.js","prebuild:mdn-data":"node ./scripts/mdn-data.js","test":"npm run lint && npm run build && npm run test-only","test-only":"nyc ava","test-release":"npm run lint && npm run build-release && ava","watch":"npm run build && npm-run-all --parallel -c watch:*","watch:ts":"npm run build:ts -- --watch"},"version":"1.1.9","bugs":{"url":"https://github.com/webhintio/hint/issues"},"_id":"@hint/utils-compat-data@1.1.9","_nodeVersion":"14.19.3","_npmVersion":"6.14.17","dist":{"integrity":"sha512-0NNhm3mHkckOJLrerzdop4ZURhTvN5++KlfwLIxxvv709bVNirF+fZOMuPqFxEcCSQab0VOMvsdexjhEk/01Hw==","shasum":"aba4d6c1b21d8c4c2b6c7b8e204523d0b8b52ab5","tarball":"http://registry-npm.ywwl.com/@hint/utils-compat-data/download/@hint/utils-compat-data-1.1.9.tgz","fileCount":34,"unpackedSize":1912579,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHo8a4SjfAHIqGGbye05KOfQOX5VO+Ev/CnSnSH7DqDQIhANWYtBJlCYR9tf2NWKEM38ZuybnJi6xHWk/2j2lcsvZU"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinn+UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoX2xAAnS5ySR3bnEieWUjhRA7XaLWzyvT2/H1tsRnEYDFiX9pVe08W\r\npf/XIJGdc8KJbF/Zs2DrPBosuwdxwWaI24Z+hzCXrDddTzMrESJMKMclupKm\r\nZGOyYk846Ti2dhp5Yh9+srq61SwXNWiI054BCbC+hd49V0VnjMSQ8K+vDMxH\r\nDZf0CFglmUq4QKigTBA5Y28FwTdDhrZB+SC6mjetVIbEoVZd0hMjg0aVhaiw\r\nb9XAX9W47dYKCvlu3OnbZl1EgXZ1v2LJc7bTyxBU3JHgr8nw0D7clsuam3/o\r\nompELt+XK6GQmjZBko83ecboZkqFD5h5HtqauwNqeMdCHm+651LAmvi+1jlS\r\nW51I6HemafQZADXDrGH0aSbTIkUaB2pYYvjzF2Qugx5zpaS/0eCBDGVz4K3z\r\nCO5NHhiZeszwMbx7KWiZSJbC6B4ff4pR4sGmXfXiTjSs07R3xvAdKMvZngVI\r\nRUrN2bKKKV3DqknVIdhLno0B/lQi6s2QasU31fB2MQKlHoUZZkrtTZQ+W6qT\r\npbNHH8o0Q6NTcT1BXTObGyhTLavKlkEE0s259/2QF3RJQXI7PKxHilcyDHSn\r\nHqS4tJXv5npYfog2QNZr4BKt7O1qRr/rgXPBm7yqzemflcxLw133LQCKmNfr\r\n5dGwTfkZ4Gr+gcuMzXeSGtubqCKo+7HGWQc=\r\n=qWCi\r\n-----END PGP SIGNATURE-----\r\n","size":84362,"noattachment":false,"key":"/@hint/utils-compat-data/-/@hint/utils-compat-data-1.1.9.tgz"},"_npmUser":{"name":"vidorteg","email":"vidorteg@microsoft.com"},"directories":{},"maintainers":[{"name":"vidorteg","email":"vidorteg@microsoft.com"},{"name":"oaflynn","email":"flynnolivia@microsoft.com"},{"name":"molant","email":"amolleda@gmail.com"},{"name":"antross","email":"antross@gmail.com"},{"name":"johnatms","email":"John.Emau@microsoft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-compat-data_1.1.9_1654554516688_0.42404015838438847"},"_hasShrinkwrap":false,"readme":"# Utils compat data (`@hint/utils-compat-data`)\n\nThis package allows you to easily query the data from [mdn-browser-compat-data][]\nto learn about the support status of a feature.\n\nThe type of information you can query is explained below:\n\n## API\n\nThe supported datasets are CSS and HTML. Most of the exposed functionality\nuses a `FeatureQuery` to indicate the type of information you are querying.\nYou can retrieve information for:\n\n* Attributes:\n\n```ts\nexport type AttributeQuery = {\n    attribute: string;\n    element?: string;\n    value?: string;\n};\n```\n\n* Elements:\n\n```ts\nexport type ElementQuery = {\n    element: string;\n};\n```\n\n* Declarations:\n\n```ts\nexport type DeclarationQuery = {\n    property: string;\n    value?: string;\n};\n```\n\n* Rules:\n\n```ts\nexport type RuleQuery = {\n    rule: string;\n};\n```\n\n* Selectors:\n\n```ts\nexport type SelectorQuery = {\n    selector: string;\n};\n```\n\nMost of the functions accept a `FeatureQuery` and a list of browser\nids to check. This package accepts two different formats of browsers\nids: browserslist or MDN.\n\nThe friendly names and ids for each one are as follows:\n\n| Browser name | [Browserslist][bl browsers] | [MDN][mdn browsers] |\n| ------------ | ------------ | --------- |\n| Chrome       | chrome       | chrome |\n| Chrome Android | and_chr    | chrome_android |\n| Edge         | edge         | edge |\n| Firefox      | ff           | firefox |\n| Firefox for Android | and_ff    | firefox_android |\n| Internet Explorer | ie      | ie |\n| Opera        | opera        | opera |\n| Opera Android | op_mobile   | opera_android |\n| QQ Android   | and_qq       | qq_android |\n| Safari       | safari       | safari |\n| Safari iOS   | ios_saf      | safari_ios |\n| Samsung Internet | samsung  | samgsunginternet_android |\n| UC Android   | and_uc       | uc_android |\n| Webview Android | android   | webview_android |\n\nYou can check the next sections for example on how to use `FeatureQuery`s\nand list of browsers.\n\n### `getFriendlyName`\n\nGet the friendly name of a browser from an id.\n\n```js\nimport { getFriendlyName } from '@hint/utils-compat-data';\n\nconsole.log(getFriendlyName('and_ff')); // \"Firefox for Android\"\nconsole.log(getFriendlyName('ie')); // \"Internet Explorer\"\n```\n\n### `getUnsupported`\n\nFilter the list of given `browsers` to return those that do not support the\ngiven CSS or HTML feature.\n\nIt accepts a `FeatureQuery` and a list of browsers.\n\n```js\nimport { getUnsupported } from '@hint/utils-compat-data';\n\nconsole.log(getUnsupported({ element: 'details' }, ['chrome 74', 'ie 11'])); // ['ie 11']\nconsole.log(getUnsupported(\n    {\n        attribute: 'rel',\n        element: 'link',\n        value: 'noopener'\n    },\n    ['edge 12', 'firefox 63'])); // ['edge 12']\n```\n\n### `getUnsupportedDetails`\n\nGet browsers without support with details on when support was added or removed.\n\nSimilar to `getUnsupported`, but returns an object with both a list of:\n\n* `browsers` which were unsupported and a map of browsers to `browserDetails`\n* to get additional information (e.g. what version the feature is added in).\n\nIt accepts a `FeatureQuery` and a list of browsers.\n\n```js\nimport { getUnsupportedDetails } from '@hint/utils-compat-data';\n\nconst unsupportedInfo = getUnsupportedDetails(\n    { property: 'appearance' },\n    ['chrome 75', 'firefox 63']);\n```\n\n`unsupportedInfo` will look something like the following:\n\n```json\n{\n    \"browsers\": [ \"chrome 75\", \"firefox 63\" ],\n    \"details\": {\n        \"chrome 75\": {\n            \"alternative\": {\n                \"name\": \"-webkit-appearance\",\n                \"versionAdded\": 1\n            }\n        },\n        \"firefox 63\": {\n            \"alternative\": {\n                \"name\": \"-moz-appearance\",\n                \"versionAdded\": 1\n            }\n        }\n    }\n}\n```\n\n**Note**: `details` is a `Map` that uses the browser versions as keys.\n\n### `getSupported`\n\nFilters the list of `browsers` with those that support the given CSS or HTML feature.\nThis is the opposite of `getUnsupported`.\n\nIt accepts a `FeatureQuery` and a list of browsers.\n\n```js\nimport { getSupported } from '@hint/utils-compat-data';\n\nconsole.log(getSupported({ element: 'details' }, ['chrome 74', 'ie 11'])); // ['chrome 74']\nconsole.log(getSupported(\n    {\n        attribute: 'rel',\n        element: 'link',\n        value: 'noopener'\n    },\n    ['edge 12', 'firefox 63'])); // ['firefox 63']\n```\n\n### `isSupported`\n\nQuery MDN for support of CSS or HTML features. It returns `true` if all\nthe `browsers` support it, `false` otherwise.\n\nIt accepts a `FeatureQuery` and a list of browsers.\n\n```js\nimport { isSupported } from '@hint/utils-compat-data';\n\nconsole.log(isSupported({ element: 'details' }, ['ie 11'])); // false\n```\n\n<!-- Link labels -->\n\n[bl browsers]: https://github.com/browserslist/browserslist#browsers\n[mdn browsers]: https://github.com/mdn/browser-compat-data/tree/master/browsers\n[mdn-browser-compat-data]: https://www.npmjs.com/package/mdn-browser-compat-data\n","publish_time":1654554516866,"_cnpm_publish_time":1654554516866,"dist-tags":{"latest":"1.1.13"}}