Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-getter

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-getter - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

lib/gHGetter.js

@@ -21,4 +21,2 @@ 'use strict';

if (config.getData) {
console.log('>>> reponame', repoName);
console.log('>>> filepath', filePath);
(0, _gHRequest2.default)('/repos/' + repoName + '/contents/' + filePath, function (err, file) {

@@ -25,0 +23,0 @@ if (err) {

2

package.json
{
"name": "github-getter",
"version": "1.0.5",
"version": "1.0.6",
"description": "Quick and easy github file retrieval",

@@ -5,0 +5,0 @@ "main": "lib/gHGetter.js",

@@ -29,3 +29,11 @@ [![codecov.io](https://codecov.io/github/des-des/github-getter/coverage.svg?branch=master)](https://codecov.io/github/des-des/github-getter?branch=master) [![bitHound Overall Score](https://www.bithound.io/github/des-des/github-getter/badges/score.svg)](https://www.bithound.io/github/des-des/github-getter) [![bitHound Dependencies](https://www.bithound.io/github/des-des/github-getter/badges/dependencies.svg)](https://www.bithound.io/github/des-des/github-getter/master/dependencies/npm) [![bitHound Dev Dependencies](https://www.bithound.io/github/des-des/github-getter/badges/devDependencies.svg)](https://www.bithound.io/github/des-des/github-getter/master/dependencies/npm)

1. navigate to `https://github.com/settings/tokens`
2. click this button to create new token
![image](https://cloud.githubusercontent.com/assets/12845233/12928897/04595204-cf68-11e5-8a4a-d41f5eca6a97.png)
3. create a file called `config.env` in your projects root
4. add the line `ghtoken=****************` to the file, adding you token.
5. run the command `npm i github-getter --save`
6. get coding!
```javascript

@@ -40,2 +48,3 @@ import { gHUser, gHRepo } from 'github-getter.js';

getData: console.log
// logs the file from https://github.com/dwyl/adoro/blob/master/README.md to the console
})

@@ -49,3 +58,4 @@ });

files['.babelrc']({
getData: (err, fileData) => console.log(fileData)
getData: console.log
// logs the file from https://github.com/des-des/aibox/blob/master/.babelrc to the console
});

@@ -55,7 +65,8 @@ },

getData: console.log
// logs the file from https://github.com/des-des/aibox/blob/master/README.md to the console
})
});
```
see src/index.es6 for an example!
see src/index.es6 for the example!
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc