Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Social Media Photo by Tobias Rademacher on Unsplash
Resolves template literals tag values before applying a generic tag.
import asyncTag from 'async-tag';
// or const asyncTag = require('asyncTag');
// or <script src="//unpkg.com/async-tag">
// example
const asyncRaw = asyncTag(String.raw);
// async values
asyncRaw`a${[
1,
[2, [Promise.resolve(3)], 4],
[5, 6]
]}${Promise.resolve(7)}c`
.then(result => {
console.assert(result === 'a1,2,3,4,5,67c')
});
// direct values
asyncRaw`a${'b'}c`
.then(result => {
console.assert(result === 'abc')
});
This module source code is written in a way that guarantees there won't be any code bloat once transpiled, without necessarily providing worse performance than native ES6+.
Both index.js and min.js target any client/server JavaScript engine, assuming there is support, or there is a polyfill, for:
Array.isArray(any)
to work with nested interpolationsPromise.all(array)
to resolve all interpolationsFunction.prototype.bind
to be sure both context and template are expectedPlease note this module is pretty much done so, if there are not many updates in the long term, it's because it's 100% code covered and, for what it does, it won't likely need any change in the future.
FAQs
Resolves template literals tag values before applying a generic tag
The npm package async-tag receives a total of 3,553 weekly downloads. As such, async-tag popularity was classified as popular.
We found that async-tag 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.