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

@dashlog/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

@dashlog/fetch-github-repositories

Fetch github repositories for a given user (or organization)

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
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 v16 or higher

Why ?

  • Fast and light (With a lazy API if required).
  • Support both users and orgs endpoints with the kind option.
  • Replacement for repos which introduce dozen of dependencies.
  • TypeScript support.

Getting Started

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

$ npm i @dashlog/fetch-github-repositories
# or
$ yarn add @dashlog/fetch-github-repositories

Usage example

import { fetch, fetchLazy } from "@dashlog/fetch-github-repositories";

const repos = await fetch("fraxken", {
    fetchUserOrgs: true // if you want an equivalent of "repos"
});

// or use lazy API
for await (const repo of fetchLazy("fraxken")) {
    console.log(repo.full_name);
}

API

fetch(namespace: string, options?: FetchOptions): Promise< Repository[] >

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

export interface FetchOptions {
  /**
   * @default fetch-github-repo
   */
  agent?: string;
  token?: string | null;
  /**
   * @default users
   */
  kind?: "users" | "orgs";
  /**
   * Fetch the repositories of all orgs for a given user
   * @default false
   */
  fetchUserOrgs?: boolean;
}

fetchLazy(namespace: string, options?: FetchOptions): AsyncIterableIterator< Repository >

Same arguments as fetch.

Contributors ✨

All Contributors

Thanks goes to these wonderful people (emoji key):


Gentilhomme

💻 🐛 📖 🛡️

License

MIT

Keywords

FAQs

Package last updated on 03 Sep 2022

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