New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@varandas/fetch-readme

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@varandas/fetch-readme

Fetch a raw readme file from any public Github repository

latest
Source
npmnpm
Version
1.0.10
Version published
Maintainers
1
Created
Source

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

Keywords

github

FAQs

Package last updated on 03 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts