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

methodqueue

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

methodqueue

A simple queueing system for methods.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

MethodQueue

MethodQueue is a simple queueing system for methods for Javascript.

Basic Usage

Install MethodQueue using NPM:

npm i methodqueue --save

Once installed, you can import it into your application using:

const Queue = require("methodqueue")

Or if you use Typescript/Webpack:

import Queue from "methodqueue"

There it is! Now, create a new method queue with:

let queue = new Queue([...methods])

Properties

Dont modify these properties, you could break stuff.

._queuedMethods

An Array containg all queued methods.

queue._queuedMethods
._processedMethods

The current method index.

queue._processedMethods

Methods

.next(...args)

Call next function with provided arguments.

queue.next({message: "Goodbye"})
.prev(...args)

Call previous function with provided arguments.

queue.prev({message: "Hello"})
.jump(index, ...args)

Call specified function with provided arguments.

queue.jump(1, {message: "Jumpin' back 'n forth."})
.add(methods)

Add methods to queue.

queue.add([a => "hello" + a, b => b + "goodbye"])

FAQs

Package last updated on 17 Mar 2018

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

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