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.
Readme
Allow users to make screenshots of their screen using a native Screen Capture API
npm install nshot
import { useScreenCapture } from 'nshot'
The above method returns a promise which resolves as a base64 string of the screenshot.
useScreenCapture(options)
.then(response => {
// do whatever you need with base64 string you will receive here as response
})
.catch(error => {
// catch any errors here, for example, if user has canceled screen capture
})
{
preferCurrentTab: boolean // true/false, whether the Screen Capture API should offer the current tab first
quality: number // a number between 0.01 and 1, determines the image quality, works only on jpeg format
format: string // format of the screenshot, supported formats: png, jpeg and webp
timer: number // number of seconds to wait before taking a screenshot. An overlay will be shown on top with countdown
}
So, the complete function could look something like this
useScreenCapture({
preferCurrentTab: true,
quality: 1,
format: 'jpeg',
timer: 3
})
.then(response => {
// your own function to download screenshot
downloadScreenshot(response)
})
.catch((error) => {
// catch error
})
Additionally, you can check if browser supports the Screen Capture API by using provided flag isScreenCaptureSupported
import { isScreenCaptureSupported } from 'nshot'
if (isScreenCaptureSupported) {
// take screenshot
}
FAQs
Allow users to make screenshots of their screen using a native Screen Capture API
The npm package nshot receives a total of 4 weekly downloads. As such, nshot popularity was classified as not popular.
We found that nshot 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.