node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

popsicle-group

Popsicle Group

NPM version NPM Downloads Build status Test coverage

Group Popsicle requests and perform operations on them all at once.

Installation

npm install popsicle-group --save

Usage

var popsicle = require('popsicle')
var group = require('popsicle-group')
 
var pageGroup = group()
 
popsicle('/users').use(pageGroup)
popsicle('/users/123').use(pageGroup)
popsicle('/users/456').use(pageGroup)
 
pageGroup.abort() // Aborts all active and future requests. 

API

  • abort Abort current and future requests in the group
  • active Get the number of active requests in the group

License

MIT license