Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yocto-queue

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yocto-queue - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

index.d.ts

@@ -51,2 +51,9 @@ export default class Queue<ValueType> implements Iterable<ValueType> {

/**
Get the next value in the queue without removing it.
@returns The value or `undefined` if the queue is empty.
*/
peek(): ValueType | undefined;
/**
Clear the queue.

@@ -53,0 +60,0 @@ */

4

index.js

@@ -49,2 +49,6 @@ /*

peek() {
return this.#head?.value;
}
clear() {

@@ -51,0 +55,0 @@ this.#head = undefined;

4

package.json
{
"name": "yocto-queue",
"version": "1.0.0",
"version": "1.1.0",
"description": "Tiny queue data structure",

@@ -15,2 +15,4 @@ "license": "MIT",

"exports": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"engines": {

@@ -17,0 +19,0 @@ "node": ">=12.20"

@@ -11,5 +11,5 @@ # yocto-queue [![](https://badgen.net/bundlephobia/minzip/yocto-queue)](https://bundlephobia.com/result?p=yocto-queue)

```sh
npm install yocto-queue
```
$ npm install yocto-queue
```

@@ -55,2 +55,8 @@ ## Usage

#### `.peek()`
Get the next value in the queue without removing it.
Returns the value or `undefined` if the queue is empty.
#### `.clear()`

@@ -57,0 +63,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc