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.
captionbot.js
Advanced tools
Readme
A tiny JavaScript wrapper for Microsoft's Captionbot API.
All image recognition is made by the Captionbot; this package only makes requesting the captions a little easier.
npm install captionbot.js
const { caption } = require("captionbot.js")
const imageURL = "https://zuwanu.com/wp-content/uploads/2019/09/cars-zuwanu.jpg"
// using then()
caption(imageURL)
.then(imageCaption => console.log(`Caption: ${imageCaption}`))
.catch(error => console.log(`Error: ${error.message}`))
// => Caption: I think it's a car parked in a parking lot.
// using async/await
async function logCaption(imageURL) {
try {
const imageCaption = await caption(imageURL)
console.log(`Caption: ${caption}`)
} catch (error) {
console.log(`Error: ${error.message}`)
}
}
logCaption()
// => Caption: I think it's a car parked in a parking lot.
Caption an image given its URL.
name | description | default |
---|---|---|
imageURL | The URL of the image to caption | |
options | {} | |
options.error | Whether to throw an error/reject when the provided URL is invalid/missing, but a response is still obtained—this will be irrelevant if there's a network error, for example | false |
Promise<String>
Thrown by caption()
when the specified URL is invalid, and the error
option is true
.
new URLError(message)
A list of captions the API returns when the specified URL is invalid.
Array<String>
Some examples of captions returned by the API.
FAQs
A tiny JavaScript wrapper for Microsoft's Captionbot API.
The npm package captionbot.js receives a total of 0 weekly downloads. As such, captionbot.js popularity was classified as not popular.
We found that captionbot.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.