Socket
Socket
Sign inDemoInstall

get-github-file

Package Overview
Dependencies
10
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    get-github-file

Get a file from a github repository


Version published
Weekly downloads
15
increased by400%
Maintainers
1
Install size
930 kB
Created
Weekly downloads
 

Readme

Source

get-github-file

Get a file from a github repository

Installation

Grab it from npm

npm install get-github-file

Usage

const getGithubFile = require('get-github-file');
getGithubFile('nerdlabs/get-github-file/package.json')
  .then(buffer => console.log(buffer.toString('utf-8')));

Parameters

getGithubFile(uri: string, options?: Options): Promise<Buffer>

uri: A string to identify a file in a github repository user/repo/path/to/file.txt

options:

  • auth: authentication object
  • branch: specify a different branch than the repository's default_branch (usually master)
  • client: an instance of the github client.

Built by (c) nerdlabs. Released under the MIT license.

Keywords

FAQs

Last updated on 30 Oct 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc