<commit_before># Github.js

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/michael/github?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Stories in Ready](https://badge.waffle.io/michael/github.png?label=ready&title=Ready)](https://waffle.io/michael/github) [![Build Status](https://travis-ci.org/michael/github.svg?branch=master)](https://travis-ci.org/michael/github) [![codecov.io](https://codecov.io/github/michael/github/coverage.svg?branch=master)](https://codecov.io/github/michael/github?branch=master)

Github.js provides a minimal higher-level wrapper around git's [plumbing commands](http://git-scm.com/book/en/Git-Internals-Plumbing-and-Porcelain), exposing an API for manipulating GitHub repositories on the file level. It was formerly developed in the context of [Prose](http://prose.io), a content editor for GitHub.

## Installation

Either grab `github.js` from this repo or install Github.js via npm:

```
npm install github-api
```

Alternatively, you can install the library using Bower:

```
bower install github-api
```

## Compatibility

[![Sauce Test Status](https://saucelabs.com/browser-matrix/githubjs.svg)](https://saucelabs.com/u/githubjs)

## Usage

Create a Github instance.

```js
var github = new Github({
  username: "YOU_USER",
  password: "<PASSWORD>",
  auth: "basic"
});
```

Or if you prefer OAuth, it looks like this:

```js
var github = new Github({
  token: "OAUTH_TOKEN",
  auth: "oauth"
});
```

You can use either:<commit_msg>README: Added note about IE9 compatibility<commit_after># Github.js

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/michael/github?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Stories in Ready](https://badge.waffle.io/michael/github.png?label=ready&title=Ready)](https://waffle.io/michael/github) [![Build Status](https://travis-ci.org/michael/github.svg?branch=master)](https://travis-ci.org/michael/github) [![codecov.io](https://codecov.io/github/michael/github/coverage.svg?branch=master)](https://codecov.io/github/michael/github?branch=master)

Github.js provides a minimal higher-level wrapper around git's [plumbing commands](http://git-scm.com/book/en/Git-Internals-Plumbing-and-Porcelain), exposing an API for manipulating GitHub repositories on the file level. It was formerly developed in the context of [Prose](http://prose.io), a content editor for GitHub.

## Installation

Either grab `github.js` from this repo or install Github.js via npm:

```
npm install github-api
```

Alternatively, you can install the library using Bower:

```
bower install github-api
```

## Compatibility

[![Sauce Test Status](https://saucelabs.com/browser-matrix/githubjs.svg)](https://saucelabs.com/u/githubjs)

**Note**: Starting from version 0.10.8, Github.js supports **Internet Explorer 9**. However, the underlying 
methodology used under the hood to perform CORS requests (the `XDomainRequest` object),
[has limitations](http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx).
In particular, requests must be targeted to the same scheme as the hosting page. This means that if a page is at 
http://example.com, your target URL must also begin with HTTP. Similarly, if your page is at https://example.com, then
your target URL must also begin with HTTPS. For this reason, if your requests are sent to the GitHub API (the default), 
which are served via HTTPS, your page must use HTTPS too.

## Usage

Create a Github instance.

```js
var github = new Github({
  username: "YOU_USER",
  password: "<PASSWORD>",
  auth: "basic"
});
```

Or if you prefer OAuth, it looks like this:

```js
var github = new Github({
  token: "OAUTH_TOKEN",
  auth: "oauth"
});
```

You can use either:
{'fraction_non_alphanumeric': 0.14711310308462958, 'fraction_numerical': 0.004745583970471922, 'mean_word_length': 5.17915309446254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 21, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6103666', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1232, 'n_words': 327}