
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@deleteagency/axios-singular
Advanced tools
A wrapper around axios that makes sure only one request is in progress at the same time
TODO About parallel request and not guaranteed order of receiving reponses
Use the package manager npm for installation.
$ npm install @deleteagency/axios-singular
import axios from 'axios';
import AxiosSingular from '@deleteagency/axios-singular';
const instance = new AxiosSingular(axios);
instance.get("/posts")
.then((response) => {
console.log(response)
},() => {
if (axios.isCancel(error)) {
console.log('Request canceled' , error)
}else{
console.error('Actual error!' , error)
}
})
Returns AxiosSingular
.
In order to use custom axios instance you have to pass CancelToken and isCancel as additional arguments. That's because custom instances don't have all base axios properties. Read this comment: https://github.com/axios/axios/issues/1330#issuecomment-362846633
Required
Type: object
Default or any custom axios instance. See details here: https://github.com/axios/axios#creating-an-instance
Optional
Type: object
CancelToken from the base axios instance
Optional
Type: Function
isCancel from the base axios instance
Returns Promise
.
Corresponding axios methos is called under the hood with all arguments bypassed. Supported methods: request, get, delete, head, options, post, put, patch See https://github.com/axios/axios#request-method-aliases
Cancel current request if it is in progress
FAQs
A wrapper around axios that makes sure only one request is in progress at the same time
The npm package @deleteagency/axios-singular receives a total of 62 weekly downloads. As such, @deleteagency/axios-singular popularity was classified as not popular.
We found that @deleteagency/axios-singular 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.