New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

get-all

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-all

Get all results from a paged API.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
6
-45.45%
Maintainers
1
Weekly downloads
 
Created
Source

get-all Build Status

Get all results from a paged API.

NPM

Example

const getAll = require('get-all');
const GH = require('github');
const github = new GH({version: "3.0.0"});

var myRequestFn = function (page, perPage, callback) {
  github.repos.getFromOrg({
    org: 'github',
    page: page
  }, function (err, repos) {
    if (err) {
      callback(err);
    } else {
      callback(null, repos);
    }
  })
};

getAll({
  startPage: 0,
  perPage: 30,
  request: myRequestFn
}, function (err, results) {
  if (err) {
    console.log(err);
  } else {
    console.log('The github org has '+results.length+' public repos.');
  }
});

Release History

  • 2014-05-12 - v0.2.0 - require perPage, rename page to startPage
  • 2014-05-12 - v0.1.0 - initial release

Keywords

paged api

FAQs

Package last updated on 13 May 2014

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