Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
saucenao api wrapper
This package is an api wrapper for SauceNAO.
const SauceNAO = require('saucenao')
let sauce = (await SauceNAO('picture.png')).json
input
string or object. An image url, filename, Buffer
, or fs
readable stream.options
object. Any extra parameters you would like to pass in the request body.IncomingMessage
with extra properties.
body
string. The plain text body received from SauceNAO's servers.json
object. The body parsed as JSON (for your convenience).response
Response. If the error happened after the response was received (most likely because of a JSON parse error), the IncomingMessage
that the promise resolves to will still be available here.response.json
will not have been defined yet, but you may be able to print out response.body
to figure out what went wrong.This function is fairly simple. It mostly just performs a request to SauceNAO for you, so that you can skip a couple function calls. It can work with local filepaths, urls that begin with http://
or https://
, fs
input streams, or even buffers.
After it receives a reply from SauceNAO, it'll attempt to parse it as JSON and add it to the Response object for your convenience. It'll return a promise that either resolves to this extended Response object or rejects an error containing as much of this extended Response object as it generated.
If you have an api key, you can specify it by using this function like a constructor. This gives you a new function that works exactly the same way as the function above, but your requests will be authenticated.
const SauceNAO = require('saucenao')
let mySauce = new SauceNAO('api_key here')
mySauce(imageDataBuffer).then((response) => {
console.log('Request successful')
console.dir(response.json)
}, (error) => {
console.error('Request encountered an error')
console.dir(error.request)
})
FAQs
saucenao api wrapper
The npm package saucenao receives a total of 12 weekly downloads. As such, saucenao popularity was classified as not popular.
We found that saucenao 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.