
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.
@jakubneubauer/limited-blocking-queue
Advanced tools
Javascript implementation of queue with asynchronous push/pull and with limit
of stored items. Operation pull
returns a promise fulfilled whenever
the item will be available (possibly immediately). The push
operation
returns a promise fulfilled when the push is possible to perform. If the queue
is not full, it will be immediately (with Promise.resolve()
), if the queue
is full, it will be when enough items will be pulled.
npm install --save @jakubneubauer/limited-blocking-queue
import {LimitedBlockingQueue} from '@jakubneubauer/limited-blocking-queue';
var queue = new LimitedBlockingQueue();
// waits for next push()
queue.pull().then((result) => console.debug(result));
setTimeout(() => {
queue.push('hello world')
}, 1000);
import {LimitedBlockingQueue} from '@jakubneubauer/limited-blocking-queue';
var queue = new LimitedBlockingQueue(); // default size is 1
(async function() {
// first push is done immediately
queue.push(1).then(() => console.debug("first push done"));
// second push is postponed because the queue is full
queue.push(2).then(() => console.debug("second push done"));
// Pull will make room in the queue, after that the second push will be done
await queue.pull().then((item) => console.debug("Pulled item " + item));
// This pulled item will be logged after the second push
await queue.pull().then((item) => console.debug("Pulled item " + item));
})();
output:
first push done
Pulled item 1
second push done
Pulled item 2
FAQs
Unknown package
The npm package @jakubneubauer/limited-blocking-queue receives a total of 14 weekly downloads. As such, @jakubneubauer/limited-blocking-queue popularity was classified as not popular.
We found that @jakubneubauer/limited-blocking-queue 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
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.