# @varandas/fetch-readme

> Fetch a raw readme file from any public Github repository

Latest version **1.0.10** (published 2023-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @varandas/fetch-readme
pnpm add @varandas/fetch-readme
yarn add @varandas/fetch-readme
bun add @varandas/fetch-readme
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2023-01-03 |
| First published | 2019-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 8 |
| Author | André Varandas |
| Maintainers | andrevarandas |
| Keywords | github, readme |

## Links

- npm: https://www.npmjs.com/package/@varandas/fetch-readme
- Repository: https://github.com/AndreVarandas/fetch-readme
- Homepage: https://github.com/AndreVarandas/fetch-readme#readme
- Issues: https://github.com/AndreVarandas/fetch-readme/issues
- npm.io page: https://npm.io/package/@varandas/fetch-readme

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2

## Recent versions

- 1.0.10 (latest) — 2023-01-03
- 1.0.9 — 2021-09-19
- 1.0.8 — 2020-10-17
- 1.0.7 — 2020-07-09
- 1.0.6 — 2020-07-08
- 1.0.5 — 2019-08-14
- 1.0.4 — 2019-02-13
- 1.0.3 — 2019-01-20
- 1.0.2 — 2019-01-20
- 0.0.0-development — 2019-01-20

## README

# Fetch Readme 📖

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

[![npm (scoped)](https://img.shields.io/npm/v/@varandas/fetch-readme.svg)](https://www.npmjs.com/package/@varandas/fetch-readme)
[![npm](https://img.shields.io/npm/dm/@varandas/fetch-readme.svg)](https://npmcharts.com/compare/@varandas/fetch-readme)

[![Build Status](https://travis-ci.org/AndreVarandas/fetch-readme.svg?branch=master)](https://travis-ci.org/AndreVarandas/fetch-readme)
[![Codecov Coverage](https://img.shields.io/codecov/c/github/AndreVarandas/fetch-readme/master.svg?style=flat-square)](https://codecov.io/gh/AndreVarandas/fetch-readme/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Known Vulnerabilities](https://snyk.io/test/github/AndreVarandas/fetch-readme/badge.svg?targetFile=package.json)](https://snyk.io/test/github/AndreVarandas/fetch-readme?targetFile=package.json)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/AndreVarandas/fetch-readme/blob/master/LICENSE)

### Install

With Yarn
- `yarn add @varandas/fetch-readme`

With npm
- `npm i --save @varandas/fetch-readme` 

### Usage

```javascript
// 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`.

```javascript
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](LICENSE)

---
_Source: https://npm.io/package/@varandas/fetch-readme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
