New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yocto-queue

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yocto-queue

Tiny queue data structure

1.2.1
latest
Source
npm
Version published
Weekly downloads
49M
-15.47%
Maintainers
1
Weekly downloads
 
Created

What is yocto-queue?

The yocto-queue npm package is a minimalistic queue with an array-like interface. It is designed to be a tiny, performant FIFO (First In, First Out) queue implementation for managing a list of items in a sequential order.

What are yocto-queue's main functionalities?

Enqueue

Adds elements to the end of the queue.

const Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('unicorn');
queue.enqueue('rainbow');

Dequeue

Removes and returns the first element from the queue.

const Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('unicorn');
queue.enqueue('rainbow');
const firstItem = queue.dequeue();

Clear

Clears the queue.

const Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('unicorn');
queue.enqueue('rainbow');
queue.clear();

Size

Returns the number of elements in the queue.

const Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('unicorn');
queue.enqueue('rainbow');
const size = queue.size;

Peek

Returns the first element in the queue without removing it.

const Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('unicorn');
queue.enqueue('rainbow');
const firstItem = queue.peek();

Other packages similar to yocto-queue

Keywords

queue

FAQs

Package last updated on 22 Mar 2025

Did you know?

Socket

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.

Install

Related posts