• Version 1.0.5
  • Published
  • 58.6 kB
  • No dependencies
  • Apache-2.0 license


npm i @blakeembrey/deque
yarn add @blakeembrey/deque
pnpm add @blakeembrey/deque


Deques are a generalization of stacks and queues



class Deque

class Deque<T> {}


    constructor(values?: Iterable<T>);

      property size

      readonly size: number;

        method [Symbol.iterator]

        [Symbol.iterator]: () => IterableIterator<T>;

          method clear

          clear: () => void;

            method delete

            delete: (index: number) => this;

              method entries

              entries: () => IterableIterator<T>;

                method extend

                extend: (values: Iterable<T>) => this;

                  method extendLeft

                  extendLeft: (values: Iterable<T>) => this;

                    method has

                    has: (needle: T) => boolean;

                      method indexOf

                      indexOf: (needle: T, start?: number) => number;

                        method insert

                        insert: (index: number, value: T) => this;

                          method keys

                          keys: () => IterableIterator<T>;

                            method peek

                            peek: (index: number) => T;

                              method pop

                              pop: () => T;

                                method popLeft

                                popLeft: () => T;

                                  method push

                                  push: (value: T) => this;

                                    method pushLeft

                                    pushLeft: (value: T) => this;

                                      method reverse

                                      reverse: () => this;

                                        method rotate

                                        rotate: (n?: number) => this;

                                          method values

                                          values: () => IterableIterator<T>;

                                            Package Files (1)

                                            Dependencies (0)

                                            No dependencies.

                                            Dev Dependencies (17)

                                            Peer Dependencies (0)

                                            No peer dependencies.


                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@blakeembrey/deque.

                                            • Markdown
                                            • HTML
                                              <a href="https://www.jsdocs.io/package/@blakeembrey/deque"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>