<commit_before># Canoe

[![Build Status](https://secure.travis-ci.org/Obvious/canoe.png)](http://travis-ci.org/Obvious/canoe)

Paddle downstream with Canoe, an S3 utility library for Node.js. Built on the [AWS Node SDK](https://github.com/aws/aws-sdk-js).

## Install

`npm install canoe --save`

## Usage

Create a new `Canoe` instance by passing an instance of `AWS.S3` from the `aws-sdk` module.

```javascript
var AWS = require('aws-sdk'),
  Canoe = require('canoe');

var s3 = new AWS.S3();
var canoe = new Canoe(s3);
```

## Methods

### createWriteStream

A Node 0.10-friendly writable stream interface ("streams2") for uploading objects to S3.

#### Usage

Creates a writable stream for a given S3 bucket/key. The stream will be returned immediately and also passed to an optional callback.

The stream will be writable when it's returned, but not actually ready to send data to S3 yet (data will be buffered internally in the meantime). If you use the immediately returned stream, be sure to respect `false`-y return values, as Node's `readable.pipe()` does. The stream will be fully ready when the callback is run.<commit_msg>Use master for CI status badge<commit_after># Canoe

[![Build Status](https://secure.travis-ci.org/Obvious/canoe.png?branch=master)](http://travis-ci.org/Obvious/canoe)

Paddle downstream with Canoe, an S3 utility library for Node.js. Built on the [AWS Node SDK](https://github.com/aws/aws-sdk-js).

## Install

`npm install canoe --save`

## Usage

Create a new `Canoe` instance by passing an instance of `AWS.S3` from the `aws-sdk` module.

```javascript
var AWS = require('aws-sdk'),
  Canoe = require('canoe');

var s3 = new AWS.S3();
var canoe = new Canoe(s3);
```

## Methods

### createWriteStream

A Node 0.10-friendly writable stream interface ("streams2") for uploading objects to S3.

#### Usage

Creates a writable stream for a given S3 bucket/key. The stream will be returned immediately and also passed to an optional callback.

The stream will be writable when it's returned, but not actually ready to send data to S3 yet (data will be buffered internally in the meantime). If you use the immediately returned stream, be sure to respect `false`-y return values, as Node's `readable.pipe()` does. The stream will be fully ready when the callback is run.
{'fraction_non_alphanumeric': 0.11115935735996527, 'fraction_numerical': 0.010421189752496743, 'mean_word_length': 4.308755760368664, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1131985', 'n_tokens_mistral': 733, 'n_tokens_neox': 686, 'n_words': 298}