
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@httpie/queue-datastructure
Advanced tools
A queue data structure for Node.js.
Installation · Usage · API
Follow @eldorplus and @httpiejs for updates!
npm i @httpie/queue-datastructure
Using the queue data structure is pretty straightforward. The library exposes a Queue class and you need to create a queue instance. You can create a queue from existing data or an empty one:
const Queue = require('@httpie/queue-datastructure')
// create a queue from an existing array
const queue = new Queue([ 1, 2, 3 ])
// or, create a queue from individual items
const queue = new Queue(1, 2, 3)
// or, create an empty queue
const queue = new Queue()
.enqueue(items)Pushes new items to the end of the queue.
queue.enqueue(1)
queue.enqueue(2, 3)
queue.enqueue([ 4, 5, 6])
.dequeue()Removes and returns the item which is up for processing. Returns undefined if the queue is empty.
queue.enqueue(1, 2, 3)
queue.size() // 3
queue.dequeue() // 1
queue.size() // 2
.peek()Returns the front item without removing it from the queue. Returns undefined if the queue is empty.
queue.enqueue(1, 2, 3)
queue.peek() // 1
.size()Returns the number of items in the queue.
queue.size() // 0
queue.enqueue(1, 2)
queue.size() // 2
.isEmpty()Returns true if there are no items in the queue, false otherwise.
queue.isEmpty() // true
queue.enqueue(1)
queue.isEmpty() // false
.isNotEmpty()Returns true if there are items in the queue, false when the queue is empty.
queue.isNotEmpty() // false
queue.enqueue(1)
queue.isNotEmpty() // true
.clear()Removes all items from the queue.
queue.clear()
queue.size() // 0
git checkout -b my-featuregit commit -am 'Add some feature'git push origin my-new-featureMIT © httpie
httpiejs.com · GitHub @httpiejs · Twitter @httpiejs
FAQs
HTTPie Queue Data Structure
The npm package @httpie/queue-datastructure receives a total of 0 weekly downloads. As such, @httpie/queue-datastructure popularity was classified as not popular.
We found that @httpie/queue-datastructure 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.