<commit_before>hooks
=========================================

Wrapper for http://hooks.events/

Install
-------
This code isn't on NPM, so you'll need to store it locally. You can do that via `git clone`. Now you just need to `require` it:

    var hooks = require("./hooks");

Try now
-------
An example, `example.js` is included to get you going. All you need to do is fill in your API key. Run it like this:

	node example.js

This example includes `./index.js` where the code resides - see "Install" above for how you should do it in external projects.

Use
---
The module contains just one method, `hook`. It takes some `options` and an optional `callback` function, which returns the standard `err, response` arguments. It's as easy as this:

    hooks.hook(
      {
        "apiKey": "...",
        "title": "Example Hook Title",
        "message": "Example Hook Message"
      },
      function(err, response) {
        if (!err) {
          console.log("Success (" + response + ")");
        } else {
          console.log("Failure (" + err + ")");
        }
      }<commit_msg>Better README.md<commit_after>hooks
=========================================

Wrapper for http://hooks.events/

Install
-------
This code isn't on NPM, so you can either store it locally or `npm install` it from this repository. I really recommend installing it from this repository. Do it like this:

	npm install jadaradix/hooks --save
	
And then `require` it like this:

	var hooks = require("hooks");

Easy! However, if you want it store it locally (via `git clone`), `require` it like this:

    var hooks = require("./hooks");

Try now
-------
An example, `example.js` is included to get you going. All you need to do is fill in your API key. Run it like this:

	node example.js

This example includes `./index.js` where the code resides - see "Install" above for how you should do it in external projects.

Use
---
The module contains just one method, `hook`. It takes some `options` and an optional `callback` function, which returns the standard `err, response` arguments. It's as easy as this:

    hooks.hook(
      {
        "apiKey": "...",
        "title": "Example Hook Title",
        "message": "Example Hook Message"
      },
      function(err, response) {
        if (!err) {
          console.log("Success (" + response + ")");
        } else {
          console.log("Failure (" + err + ")");
        }
      }
{'fraction_non_alphanumeric': 0.15448161916563405, 'fraction_numerical': 0.0, 'mean_word_length': 2.7033639143730888, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6212558', 'n_tokens_mistral': 677, 'n_tokens_neox': 660, 'n_words': 295}