{"name":"@xobotyi/scrollbar-width","version":"1.1.1","description":"Comprehensive and lightweight tool to get browser's scrollbars width.","keywords":["scrollbar","width","native","browser","detect","scrollbar-width"],"repository":{"type":"git","url":"git+https://github.com/xobotyi/scrollbar-width.git"},"bugs":{"url":"https://github.com/xobotyi/scrollbar-width/issues"},"homepage":"https://github.com/xobotyi/scrollbar-width","author":{"name":"Anton Zinovyev","email":"xog3@yandex.ru","url":"https://github.com/xobotyi"},"license":"MIT","main":"dist/index.js","module":"dist/index.esm.js","esnext":"dist/index.esnext.js","types":"dist/index.d.ts","sideEffects":false,"devDependencies":{"@semantic-release/changelog":"^3.0.5","@semantic-release/git":"^7.0.18","@semantic-release/npm":"^5.3.4","husky":"^3.1.0","lint-staged":"^9.4.3","prettier":"^1.19.1","rimraf":"^3.0.0","rollup":"^1.27.2","rollup-plugin-typescript2":"^0.25.2","semantic-release":"^15.13.31","terser":"^4.4.0","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","tslint-eslint-rules":"^5.4.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.7.2"},"scripts":{"lint":"tslint 'src/**/*.ts' -t verbose","lint:fix":"yarn lint --fix","lint:types":"tsc --noEmit","build":"rimraf dist && rollup --config && yarn minify","minify":"terser ./dist/index.min.js -o ./dist/index.min.js -mc pure_funcs=['Object.defineProperty'] --toplevel"},"lint-staged":{"src/**/*.ts":["tslint --fix -t verbose","git add"]},"husky":{"hooks":{"pre-commit":"yarn lint:types && lint-staged","pre-push":"yarn lint && rimraf dist && yarn build"}},"release":{"branches":["master",{"name":"next","prerelease":"rc"}],"verifyConditions":["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git","@semantic-release/github"],"prepare":["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},"gitHead":"2314200a8ae69d77fa5badae7c7e90d24a095f7e","_id":"@xobotyi/scrollbar-width@1.1.1","_nodeVersion":"12.13.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-am50ApgM0Gu6EvWa4HzTREJYTtEiVx/fS4zsWedc7dV+rI6AsP2Kr9AYGiva8SHVQpGHlzWJgzE+95HoI4SugQ==","shasum":"86cbb6e7a3fea2c7f536986cb7b84a0b98cb0499","tarball":"http://registry-npm.ywwl.com/@xobotyi/scrollbar-width/download/@xobotyi/scrollbar-width-1.1.1.tgz","fileCount":9,"unpackedSize":11537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd06/8CRA9TVsSAnZWagAAEA8P/3pqs1RlIk2+b6cVcMB6\nTaDq2qQcm55WUiZMZDKsgbfcIvrEm7G0i9tfeCv9dRT8Etcnfvug+dbLRrJZ\nGrrvFoi8VKbtiJMZ8ihCxIKOuKOw2OLnoCJ1BGQTiSC+O5uk5KggITvBo9MP\n+4byh716bsGhHp+npHzsU6hNcKBShIKu9S8q7MvwLV/06UPjbePXgaWiT30l\nlA/aJDyWf0Bwv/kxMqKodo58gGoyVzsrL+81RPAGxBPDmtlNXKkiABYB/LEF\nx3GuUALQEX8BcJpZgoqClaP+92Cm+VmQh2k9GlafxHBteVx70CiQyDLL8ZlE\nM+2mhjjXqfX66Z/3d6kpMKC2bM76F84O0MY+OWVz7RKa/8Xzl+POaBPL2tc6\n3ufrZGtNd0I3IOVjrvYcqF0xkukLv0P8Q5sV93OSo2tG9be53QPBqQzIj5e7\naYrWa0cw2VjwekkvlE6wyqKMjyBg8sAcZfE+3RDKPPHFVLJk7iV1rAel1GCd\neT4UaxspcPiOYHRZN+r4WpG7KlEiY4k1wID4nad2M/SotDvPCqor/83U7T1J\n4KjXQ/iEy/npsR8RNzB9uPGDibpUU6UQkH15J7810GpRXhhGkGV51Zo64aFj\nzvwUaYaeNlK/8oIJ6ruZemXouAPF1u1nbOEBTbOelz4fdx/p+yiFAgOSfe/7\ngSK0\r\n=M79C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBCNFj9h/iX/S44GAiFDYt6ELST/KC8kfkw/TibchEHQIhAPPf8V4Um0urFI0VZg/kkayZbyFzVaMl52Q7ErTJ0eRH"}],"size":4177,"noattachment":false,"key":"/@xobotyi/scrollbar-width/-/@xobotyi/scrollbar-width-1.1.1.tgz"},"maintainers":[{"name":"xobotyi","email":"xog3@yandex.ru"}],"_npmUser":{"name":"xobotyi","email":"xog3@yandex.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scrollbar-width_1.1.1_1574154236430_0.055373505652633215"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n    <H1>@xobotyi/scrollbar-width</H1>\n    <p>A tool to get browser's scrollbars width.</p>\n    <p>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/travis/xobotyi/scrollbar-width\" alt=\"Build status\"/>\n        </a>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/npm/v/@xobotyi/scrollbar-width\" alt=\"NPM version\"/>\n        </a>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/npm/dw/@xobotyi/scrollbar-width\" alt=\"NPM weekly downloads\"/>\n        </a>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/npm/license/@xobotyi/scrollbar-width\" alt=\"License\"/>\n        </a>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/npm/types/@xobotyi/scrollbar-width\" alt=\"Types definition\"/>\n        </a>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/codacy/grade/1bc2560a1b614f9595b718169c969b4d\" alt=\"Codacy Code Grade\"/>\n        </a>\n        <a href=\"https://www.npmjs.com/package/@xobotyi/scrollbar-width\">\n            <img src=\"https://flat.badgen.net/codacy/coverage/1bc2560a1b614f9595b718169c969b4d\" alt=\"Tests LOC\"/>\n        </a>\n    </p>\n    <p>×&nbsp;<strong><a href=\"https://codesandbox.io/s/xobotyiscrollbar-width-live-demo-bp5no\">LIVE EXAMPLE</a></strong>&nbsp;×</p>\n</div>\n\n---\n\n<div align=\"center\">❤️Please consider starring this project to show your love and support.🙌</div>\n\n---\n\n## Installation\n\n```bash\nnpm install @xobotyi/scrollbar-width\n# or via yarn\nyarn add @xobotyi/scrollbar-width\n```\n_INSTALLATION NOTE:_  \nThis lib is written in TypeScript and delivered with both, transpiled and untranspiled ES versions:\n\n- `main` field of package.json is pointing to transpiled ES5-compatible version with CJS modules resolution;\n- `module` field is pointing to transpiled ES5-compatible version with ES modules resolution;\n- `esnext` field is pointing to the ESnext version with ES modules resolution;\n\n\n**OR**  \nyou can add it directly to your site via the `<script />` with help of [UNPKG](https://unpkg.com):\n```html\n<script src=\"https://unpkg.com/@xobotyi/scrollbar-width/dist/index.min.js\"/>\n```\nAfter that you will be able to use the function as `xobotyi.scrollbarWidth()`\n\n## Usage\n\n```javascript\nimport { scrollbarWidth } from '@xobotyi/scrollbar-width';\n\nscrollbarWidth(); // for most browsers will return 17 and 0 for SSR environment\n// or undefined if to call it too early [read below]\n```\n\nThis function caches the value to avoid increased resources usage. In case you want to get re-calculated value - pass `true` as first call parameter.\n\n>**NOTE:**  \n>Function will return `undefined` in case being called before the DOM is ready.\n\n#### One more clarification\nThis function has inner cache due to scrollbars width is not intended to be changed since initial call, but it can in case you toggle the device emulation.  \nIf you need function to recalculate the width call it with `true` parameter and get new value or set `scrollbarWidth.__cache` to `undefined` and next call will return the fresh value.\n\n## Related projects\n\n- [react-scrollbars-custom](https://www.npmjs.com/package/react-scrollbars-custom) &mdash; The best React custom scrollbars component. Allows you to customise scrollbars as you like it, crossbrowser!\n- [zoom-level](https://www.npmjs.com/package/zoom-level) &mdash; A comprehensive cross-browser package that allow you to determine page's and element's zoom level.\n- [@xobotyi/should-reverse-rtl-scroll](https://www.npmjs.com/package/@xobotyi/should-reverse-rtl-scroll) &mdash; A tool detecting if RTL scroll value should be negative.\n","publish_time":1574154236549,"_cnpm_publish_time":1574154236549,"dist-tags":{"latest":"1.9.5"}}