Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@xobotyi/scrollbar-width
Advanced tools
Readme
npm install @xobotyi/scrollbar-width
# or via yarn
yarn add @xobotyi/scrollbar-width
INSTALLATION NOTE:
This lib is written in TypeScript and delivered with both, transpiled and untranspiled ES versions:
main
field of package.json is pointing to transpiled ES5-compatible version with CJS modules resolution;module
field is pointing to transpiled ES5-compatible version with ES modules resolution;esnext
field is pointing to the ESnext version with ES modules resolution;OR
you can add it directly to your site via the <script />
with help of UNPKG:
<script src="https://unpkg.com/@xobotyi/scrollbar-width/dist/index.min.js"/>
After that you will be able to use the function as xobotyi.scrollbarWidth()
import { scrollbarWidth } from '@xobotyi/scrollbar-width';
scrollbarWidth(); // for most browsers will return 17 and 0 for SSR environment
// or undefined if to call it too early [read below]
This function caches the value to avoid increased resources usage. In case you want to get re-calculated value - pass true
as first call parameter.
NOTE:
Function will returnundefined
in case being called before the DOM is ready.
This 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.
If 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.
FAQs
A tool to get browser's scrollbars width.
The npm package @xobotyi/scrollbar-width receives a total of 1,467,452 weekly downloads. As such, @xobotyi/scrollbar-width popularity was classified as popular.
We found that @xobotyi/scrollbar-width demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.