<commit_before>HTTP (api) adapter for [crudlet](http://github.com/mojo-js/crudlet.js).

Simple example:

```javascript
var crudlet = require("crudlet");
var http = require("crudlet-http");
var db = crudlet.child(http(), {
  prefix: "/api"
});

// POST /api/people
db(crud.op("insert", {
  collection: "people",
  data: { name: "abba" }
}))

// this also works too:
db(crud.op("insert", {
  path: "/people",

  // overridable
  method: "POST",

  // keep collection to make sure your API is interoperable
  // with other crudlet adapters
  collection: "people",
  data: { name: "abba" }
}))
```

#### http + [caplet](https://github.com/mojo-js/caplet.js) example:

```javascript
var caplet = require("caplet");
var crud   = require("crudlet")
var http   = require("crudlet-http");
var _      = require("highland");

var db = http({
  prefix: "/api",
  path: function (operation) {

    var path = "";
    var cpath;
    var mpath;

    if (operation.owner) {
      path += "/" + operation.owner.collectionName;
    }

    cpath = path + "/" + operation.collection;
    mpath = cpath + "/" + operation.data ? operation.data.uid : void 0;

    return {
      "insert" : cpath,
      "update" : mpath,<commit_msg>update docs<commit_after>HTTP (api) adapter for [crudlet](http://github.com/mojo-js/crudlet.js).

Simple example:

```javascript
var crudlet = require("crudlet");
var http = require("crudlet-http");
var db = crudlet.child(http(), {
  prefix: "/api"
});

// POST /api/people
db(crud.op("insert", {
  collection: "people",
  data: { name: "abba" }
}))

// this also works too:
db(crud.op("insert", {
  path: "/people",

  // overridable
  method: "POST",

  // keep collection to make sure your API is interoperable
  // with other crudlet adapters
  collection: "people",
  data: { name: "abba" }
}))
```

#### http + [caplet](https://github.com/mojo-js/caplet.js) example

```javascript
var caplet = require("caplet");
var crud   = require("crudlet")
var http   = require("crudlet-http");
var _      = require("highland");

var db = http({
  prefix: "/api",
  path: function (operation) {

    var path = "";
    var cpath;
    var mpath;

    if (operation.owner) {
      path += "/" + operation.owner.collectionName;
    }

    cpath = path + "/" + operation.collection;
    mpath = cpath + "/" + operation.data ? operation.data.uid : void 0;

    return {
      "insert" : cpath,
      "update" : mpath,
{'fraction_non_alphanumeric': 0.18178053830227744, 'fraction_numerical': 0.0008281573498964803, 'mean_word_length': 3.1512027491408934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1103694', 'n_tokens_mistral': 866, 'n_tokens_neox': 840, 'n_words': 204}