1.0.10 • Published 1 year ago

@varandas/fetch-readme v1.0.10

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago

Fetch Readme 📖

Fetch a raw readme.md from a public github repository.

npm (scoped) npm

Build Status Codecov Coverage semantic-release Known Vulnerabilities GitHub license

Install

With Yarn

  • yarn add @varandas/fetch-readme

With npm

  • npm i --save @varandas/fetch-readme

Usage

// Usage for commonjs
const { fetchReadme } = require('@varandas/fetch-readme');

fetchReadme({
  username: 'Microsoft',
  repository: 'TypeScript'
}).then(readme => console.log(readme));

// OR ES2015
import { fetchReadme } from '@varandas/fetch-readme'

(async () => {
  const readme = await fetchReadme({
    username: 'Microsoft',
    repository: 'TypeScript'
  })
  console.log(readme)  
})()

Configuration Options

Both username and repository properties are required. branch defaults to master and readme to README.md.

const config = {
    username: 'andrevarandas',
    repository: 'the-repository-name',
    branch: 'develop',
    readme: 'readme.md'
}

Note The readme file name is case sensitive.

LICENSE - MIT - André Varandas

1.0.10

1 year ago

1.0.9

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago