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.
js-viewport-utils
Advanced tools
Readme
Includes:
viewportUtils
npm install js-viewport-utils
And then:
var viewportUtils = require('js-viewport-utils');
bower install js-viewport-utils
<script src="path-to/js-viewport-utils.js"></script>
import {inViewport, inViewportBottom} from "js-viewport-utils";
var foo = document.getElementById("foo");
viewportUtils.inViewport(foo, {sides: "left"});
If working with jQuery
var $foo = jQuery("#foo");
viewportUtils.inViewport($foo[0], {sides: "left"});
Sides can be passed as unique string with spaces
var options = {sides: "top right left bottom"}
###Use another element as viewport
var bar = document.querySelector("#bar"); // Alternative for `getElementById`
viewportUtils.inViewport(elem, {container: bar});
###Custom thresholds
viewportUtils.inViewport(elem, {top: 12, right: 12});
For more options, see Settings section below.
viewportUtils.inViewportLeft(elem);
viewportUtils.inViewportTop(elem);
These will check for the matching side, with default settings
MIT © Tony Samperi
This library is free, open source, and GPL friendly. You can use it for commercial projects, open source projects, or really almost whatever you want.
Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded files already contain embedded comments with sufficient attribution, so you shouldn't need to do anything additional when using these files normally.
Tony Samperi, tonysamperi.github.io
FAQs
A set of viewport utils
The npm package js-viewport-utils receives a total of 26 weekly downloads. As such, js-viewport-utils popularity was classified as not popular.
We found that js-viewport-utils demonstrated a healthy version release cadence and project activity because the last version was released less than 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.