1.0.2 • Published 2 years ago
github-repo-fetcher v1.0.2
github-repo-fetcher
Get a list of Github repositories by username
Installation
# using npm
npm i github-repo-fetcher
# using yarn
yarn add github-repo-fetcher
Usage
# using require
const { getrepos } = require('github-repo-fetcher');
# using import
import { getrepos } from 'github-repo-fetcher';
Example
Using promises:
getrepos({
'harsh2220', // provide GitHub username here
1, // Provide page here
30 // Provide per page repositories here
}).then((repositories) => console.log(repositories));
Using async/await:
const getRepositories = async function () {
const repositories = await getrepos({
'harsh2220', // provide GitHub username here
1, // Provide page here
30 // Provide per page repositories here
});
console.log(repositories);
};
getRepositories();