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.
memcached-typed
Advanced tools
npm install memcached-typed --save
describe("#fetchMulti", () => {
const memcached = new Memcached();
const fetcher = new MemcachedFetcher(memcached);
it("should fetch only missing sets", async () => {
const res1 = await fetcher.multiFetch(
[1, 2, 3, 4, 5],
(arg) => `v1-${arg}`,
3600,
async (args) => {
return args.map((arg) => arg * arg);
}
);
expect(res1).to.deep.eq([1, 4, 9, 16, 25]);
// it's using same hash key, so should reuse cache for exsiting values
const res2 = await fetcher.multiFetch(
[1, 2, 100, 200, 5],
(arg) => `v1-${arg}`,
3600,
async (args) => {
return args.map((arg) => arg + arg);
}
);
expect(res2).to.deep.eq([1, 4, 200, 400, 25]);
const res3 = await fetcher.multiFetch(
[],
(arg) => `v1-${arg}`,
3600,
async (args) => {
return args.map((arg) => arg);
}
);
expect(res3).to.deep.eq([]);
});
});
this only supports > 1.4.14
FAQs
Typescript cached fetching helper
The npm package memcached-typed receives a total of 41 weekly downloads. As such, memcached-typed popularity was classified as not popular.
We found that memcached-typed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
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.