
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@maxdome/cache
Advanced tools
const cache = require('@maxdome/cache')(client);
const value = await cache(
'key',
async () => 'value'
);
If the client supports setJSON()
and getJSON()
(e.g. @maxdome/redis) it
will be used to encode/decode the values.
const cache = require('@maxdome/cache')(client);
const value = await cache(
'key',
async () => ({ example: 'example' })
);
An expire (in seconds) can be passed to automatically remove the value from the cache after certain time.
const cache = require('@maxdome/cache')(client);
const value = await cache(
'key',
async () => 'value',
1 * 60 * 60
);
If the expire is an object supporting asSeconds()
(e.g. @maxdome/duration or moment.duration) it will be used.
const cache = require('@maxdome/cache')(client);
const duration = require('@maxdome/duration');
const value = await cache(
'key',
async () => 'value',
duration('1h')
);
The invalidate will be called after getting the value from the cache and can, if return true, force to get a new value.
const cache = require('@maxdome/cache')(client);
const value = await cache(
'key',
async () => 'value',
{ invalidate: value => value.invalid }
);
If refresh
is true
, the expire will always be refreshed if the key is available and the value is valid.
const cache = require('@maxdome/cache')(client);
const value = await cache(
'key',
async () => 'value',
{ refresh: true }
);
FAQs
```javascript const cache = require('@maxdome/cache')(client);
The npm package @maxdome/cache receives a total of 0 weekly downloads. As such, @maxdome/cache popularity was classified as not popular.
We found that @maxdome/cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.