🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

modals-queue

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modals-queue

Promise based queue

1.0.0
Source
npm
Version published
Maintainers
1
Created
Source

Modals queue

Promise based queue.

Installing

npm install modals-queue --save
- or -
yarn add modals-queue

Usage

const queue = require('modals-queue');

queue.showModal( ( modal_id ) =>
{
    //Your logic here and if the modal has ended you should call
    queue.onModalClosed( modal_id );
}, flow_id/*optional*/);

//Cancel all modals for flow_id
queue.cancelModals( flow_id );

API

showModal( callback, flow_id )

Show modal, first param is callback with modal id and second is optional for your flow id.

onModalClosed( modal_id )

Close the modal.

cancelModals( flow_id )

Cancel all modals for flow_id. You don't have to insert the flow_id, but then all modals will be canceled.

Keywords

modal

FAQs

Package last updated on 18 Jul 2019

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