Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

fetch-github-repositories

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

fetch-github-repositories

Fetch github repositories for a given user (or organization)

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

fetch-github-repositories

version Maintenance MIT dep size

Fetch github repositories for a given user (or an organization).

Requirements

  • Node.js v10 or higher

Why ?

  • Fast and light.
  • Replacement for repos which introduce dozen of dependencies just for a GET request...
  • Come with a bundled TypeScript definition for intellisense.

Getting Started

This package is available in the Node Package Repository and can be easily installed with npm or yarn.

$ npm i fetch-github-repositories
# or
$ yarn add fetch-github-repositories

Usage example

const fetchGithubRepositories = require("fetch-github-repositories");

async function main() {
    const options = { agent: "my-program" };
    const repos = await fetchGithubRepositories("userName", options);
    // Do the job with repos
}
main().catch(console.error);

API

fetchGithubRepositories(user: string, options?: Options): Repository[]

Return an Array of repositories (the interface can be found in index.d.ts).

Options:

namedefault valuedescription
agent"fetch-github-repo"User-Agent header (required by github)
tokenundefinedgithub token for private repositories

License

MIT

Keywords

retrieve

FAQs

Package last updated on 03 Aug 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