1.0.2 • Published 11 months ago

bs-npm-template v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

bs-npm-template

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 bs-npm-template

# using yarn
yarn add bs-npm-template

Usage

# using require
const { getRepos } = require('bs-npm-template');

# using import
import { getRepos } from 'bs-npm-template';

Example

Using promises:

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

Using async/await:

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

getRepositories();
1.0.2

11 months ago

1.0.0

11 months ago