Namibian Pyjama Merchant
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

git-read

0.1.0 • Public • Published

git-read

Read files from git

Usage

const GitReader = require('git-read')
const gitReader = new GitReader('https://github.com/user/repo.git')
 
gitReader.load().then(() => {
  console.log(gitReader.read('config/user.json'))
})
 
// output:
// { "name": "Foo", "last_name": "Bar" }
API What it does
constructor(repoPath) Builds a consumer for the specified repository
read(filePath) Returns the content of the repo file encoded by utf8

install

npm i git-read

Downloadsweekly downloads

4

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability