1.0.4 • Published 3 years ago

githubreposearch v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

githubreposearch

Get a list of Github repositories of specified username sorted by numbers of stars in descending order and last updated time

Installation

// Using NPM
npm install githubreposearch

// Using Yarn
yarn add githubreposearch

Usage

// Using Require
const { getRepos } = require('githubreposearch');

// Using Import
import { getRepos } from 'githubreposearch';

Example

Using promises:

getRepos({
  username: 'LilJuiceBox491', // provide GitHub username here
  page: 1, // optional property: default value is 1
  per_page: 50 // optional property: default value is 50
}).then((repositories) => console.log(repositories));

Using async/await:

const getRepositories = async function () {
  const repositories = await getRepos({
    username: 'LilJuiceBox491', // provide GitHub username here
    page: 1, // optional property: default value is 1
    per_page: 50 // optional property: default value is 50
  });
  console.log(repositories);
};

getRepositories();