open-index/open-npm huggingface dataset:
npm package: @rappestad/winston-nodemailer
Description: A nodemailer transport for winston
Author: Olof Rappestad
Latest version: 3.0.2

# @rappestad/winston-nodemailer
A [nodemailer](https://www.npmjs.com/package/nodemailer) transport for [winston](https://www.npmjs.com/package/winston)

[![npm (scoped)](https://img.shields.io/npm/v/@rappestad/winston-nodemailer.svg)](https://www.npmjs.com/package/@rappestad/winston-nodemailer)
[![license](https://img.shields.io/github/license/rappestad/winston-nodemailer.svg)](https://github.com/rappestad/winston-nodemailer/blob/master/LICENSE)
[![Build Status](https://img.shields.io/travis/rappestad/winston-nodemailer.svg)](https://travis-ci.org/rappestad/winston-nodemailer)
[![Coverage Status](https://img.shields.io/coveralls/rappestad/winston-nodemailer.svg)](https://coveralls.io/github/rappestad/winston-nodemailer?branch=master)
[![David](https://img.shields.io/david/peer/rappestad/winston-nodemailer.svg)]()
[![David](https://img.shields.io/david/dev/rappestad/winston-nodemailer.svg)]()

## Installation
Install the module and the typescript definitions:
```bash
npm install winston --save
npm install @rappestad/winston-nodemailer --save
```

## Example
```typescript
import * as winston from 'winston'
import { WinstonNodemailer } from '@rappestad/winston-nodemailer'

winston.configure({
  transports: [
    // log to console
    new winston.transports.Console({
      timestamp: () => (new Date()).toLocaleTimeString(),
      colorize: true,
      level: 'debug'
    }),

    // log to email
    new WinstonNodemailer({
      // check nodemailer for options available for the smtp transport
      host: 'example.com',
      port: 25,
      to: 'example@example.com',
      from: '"Winston" <noreply@example.com>',
      subject: 'Oi, here are some log entries!',

      // default: 'error'
      level: 'warn',

      // wait for additional log entries for 1000 ms
      // before sending the email
      // default: 60000 (1 minute)
      debounce: 1000
    })
  ]
})
```
npm package: @rappi/zeplin-cli-connect-android-plugin
Description: zeplin connected component android plugin
Latest version: 1.1.0

# Zeplin CLI Android Plugin 

[Zeplin CLI](https://github.com/zeplin/cli) plugin to generate descriptions and code snippets for Android components.

## How it works
The plugin search for xml files and add to the snippet the first child inside the `<merge>` tags in that file.
It is a good way to show an example of usages referencing to code in a showcase app

## Example
For the following text_view.xml file
```xml
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">

    <!--    Main Title component example, can also be used with bold variant-->
    <TextView
        android:id="@+id/main_title"
        style="@style/MainTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Main Title" />

</merge>
```
you are going to see following result
![alt text](/zeplin_result.png?raw=true "Zeplin connected component")

## Installation

Install the plugin using npm.
```sh
npm install -g @rappi/zeplin-cli-connect-android-plugin
```

## Usage

Run CLI `connect` command using the plugin.

```sh
zeplin connect -p @zeplin/cli-connect-swift-plugin
```

## About Connected Components

[Connected Components](https://blog.zeplin.io/introducing-connected-components-components-in-design-and-code-in-harmony-aa894ed5bd95) in Zeplin lets you access components in your codebase directly on designs in Zeplin, with links to Storybook, GitHub and any other source of documentation based on your workflow. 🧩

[Zeplin CLI](https://github.com/zeplin/cli) uses plugins like this one to analyze component source code and publishes a high-level overview to be displayed in Zeplin.
npm package: @rappopo/dab
Description: For dummies! Collection of the most useless data access layers! Ever!
Author: Ardhi Lukianto
Latest version: 0.6.13

# @rappopo/dab

A dead easy Database Access Layers for dummies like me!

Kungfu masters, please stay away from this library or else it'll hurts you!

[Documentation](https://books.rappopo.com/dab/)

## Implementation

* [@rappopo/dab-memory](https://github.com/rappopo/dab-memory) a custom lodash based memory database
* [@rappopo/dab-ne](https://github.com/rappopo/dab-ne) for NeDB
* [@rappopo/dab-mongo](https://github.com/rappopo/dab-mongo) for MongoDB
* [@rappopo/dab-knex](https://github.com/rappopo/dab-knex) for KnexJS
* [@rappopo/dab-couch](https://github.com/rappopo/dab-couch) for CouchDB 2.0 and above
* [@rappopo/dab-pouch](https://github.com/rappopo/dab-pouch) for PouchDB
* [@rappopo/dab-es](https://github.com/rappopo/dab-es) for Elasticsearch
* [@rappopo/dab-couch-es](https://github.com/rappopo/dab-couch-es) for wierd couple: CouchDB & Elasticsearch
* [@rappopo/dab-redis](https://github.com/rappopo/dab-redis) for Redis

## Donation
* [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/ardhilukianto)
* Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

[MIT](LICENSE.md)
npm package: @rappopo/dab-couch
Description: CouchDB 2.x data access layer for Rappopo DAB
Author: Ardhi Lukianto
Latest version: 0.6.7

# @rappopo/dab-couch

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for CouchDB 2.0 and above.

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-couch
```

And within your script:

```javascript
const DabCouch = require('@rappopo/dab-couch')
const dab = new DabCouch({
  url: 'http://localhost:5984',
  dbName: 'mydb'
})
...
dab.findOne('my-doc').then(function(doc) { ... })
```

## Options

`url`: your CouchDB url endpoint. If it not provided, it defauts to: *http://localhost:5984*

`dbName`: the database name to connect to. Defaults to *test*

`retainOnRemove`: array of columns to retain when a document is deleted. Default: []. 

When CouchDB delete a document, it actually PUTs a document with content like this:

```javascript
{
  "_id": "<doc_id>",
  "_rev": "<rev_id>",
  "_deleted": true
}
```

But sometimes you want to also have some columns to be put on that deleted document. The `retainOnRemove` simply left those columns intact, e.g:

```javascript
{
  "_id": "<doc_id>",
  "_rev": "<rev_id>",   
  "_deleted": true,
  "type": "ADDRESS"
}
```

## Features

* [x] [find](https://docs.rappopo.com/dab/method/find/)
* [x] [findOne](https://docs.rappopo.com/dab/method/find-one/)
* [x] [create](https://docs.rappopo.com/dab/method/create/)
* [x] [update](https://docs.rappopo.com/dab/method/update/)
* [x] [remove](https://docs.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://docs.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://docs.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://docs.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://docs.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://docs.rappopo.com/dab/method/copy-to/)

## Misc

* [ChangeLog](CHANGELOG.md)
* Donation: Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

(The MIT License)

Copyright © 2017 Ardhi Lukianto <ardhi@lukianto.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @rappopo/dab-couch-es
Description: A CouchDB ♥ Elasticsearch data access layer, a true BFF!
Author: Ardhi Lukianto
Latest version: 0.0.7

# @rappopo/dab-couch-es

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for CouchDB 2.0 AND Elasticsearch for finding documents. 

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-couch-es
```

And within your script:

```javascript
const DabCouchEs = require('@rappopo/dab-couch-es')
const dab = new DabCouchEs({
  couch: {
    url: 'http://localhost:5984',
    dbName: 'mydb'    
  },
  es: {
    hosts: ['localhost:9200'],
    index: 'myindex',
    type: 'mytype'
  },
  delay: 1000
})
...
dab.findOne('my-doc').then(function(doc) { ... })
```

## Options

`couch`: see [@rappopo/dab-couch](https://github.com/rappopo/dab-couch) options

`es`: see [@rappopo/dab-es](https://github.com/rappopo/dab-es) options

`delay`: time to wait (in ms) to let CouchDB fully synchronize with Elasticsearch after a create/update/remove action. Optional, defaults to 1000 ms

## Features

* [x] [find](https://docs.rappopo.com/dab/method/find/)
* [x] [findOne](https://docs.rappopo.com/dab/method/find-one/)
* [x] [create](https://docs.rappopo.com/dab/method/create/)
* [x] [update](https://docs.rappopo.com/dab/method/update/)
* [x] [remove](https://docs.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://docs.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://docs.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://docs.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://docs.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://docs.rappopo.com/dab/method/copy-to/)

## Misc

* [ChangeLog](CHANGELOG.md)
* Donation: Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

(The MIT License)

Copyright © 2017 Ardhi Lukianto <ardhi@lukianto.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @rappopo/dab-es
Description: An Elasticsearch data access layer that stinks!
Author: Ardhi Lukianto
Latest version: 0.0.8

# @rappopo/dab-es

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for Elasticsearch. The excellent library [e3po](https://github.com/dab00/e3po) is used to transform Mongo Query Language to Elasticsearch DSB.

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-es
```

And within your script:

```javascript
const DabEs = require('@rappopo/dab-es')
const dab = new DabEs({
  hosts: ['localhost:9200'],
  index: 'myindex',
  type: 'mytype'
})
...
dab.findOne('my-doc').then(function(doc) { ... })
```

## Options

`hosts`: your Elasticsearch hosts array. If it not provided, it defauts to: *['localhost:9200']*

`index`: the index name to bound to. Defaults to *test*

`type`: the default type use. Defaults to *doc*

Index and/or type can also be provided as params during a method call. If you do this, the provided one will be used instead.

## Features

* [x] [find](https://docs.rappopo.com/dab/method/find/)
* [x] [findOne](https://docs.rappopo.com/dab/method/find-one/)
* [x] [create](https://docs.rappopo.com/dab/method/create/)
* [x] [update](https://docs.rappopo.com/dab/method/update/)
* [x] [remove](https://docs.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://docs.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://docs.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://docs.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://docs.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://docs.rappopo.com/dab/method/copy-to/)

## Misc

* [ChangeLog](CHANGELOG.md)
* Donation: Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

(The MIT License)

Copyright © 2017 Ardhi Lukianto <ardhi@lukianto.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @rappopo/dab-knex
Description: A KnexJS data access layer for @rappopo/dab
Author: Ardhi Lukianto
Latest version: 0.6.9

# @rappopo/dab-knex

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for [Knex](http://knexjs.org/)

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-knex
```

Don't forget to also install the needed client library, e.g (if you choose to use sqlite3):

```
$ npm install sqlite3
```

And within your script:

```javascript
const DabKnex = require('@rappopo/dab-knex')
const dab = new DabKnex({
  client: 'sqlite3',
  connection: {
    filename: '/tmp/mydb.sqlite3'
  }
})

// prepare collections
dab.createCollection({ name: 'test' })
  .then(result => {
    return dab.bulkCreate(data, { collection: 'test' })
  })
...
// lets dab!
dab.findOne('my-doc', 'test').then(function(doc) { ... })
```

## Options

`client`: your Knex's client database library

`connection`: your Knex's connection settings

## Features

* [x] [find](https://books.rappopo.com/dab/method/find/)
* [x] [findOne](https://books.rappopo.com/dab/method/find-one/)
* [x] [create](https://books.rappopo.com/dab/method/create/)
* [x] [update](https://books.rappopo.com/dab/method/update/)
* [x] [remove](https://books.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://books.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://books.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://books.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://books.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://books.rappopo.com/dab/method/copy-to/)
* [x] [createCollection](https://books.rappopo.com/dab/method/create-collection/)
* [x] [renameCollection](https://books.rappopo.com/dab/method/rename-collection/)
* [x] [removeCollection](https://books.rappopo.com/dab/method/remove-collection/)

## Donation
* [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/ardhilukianto)
* Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

[MIT](LICENSE.md)
npm package: @rappopo/dab-memory
Description: An in-memory data access layer for @rappopo/dab
Author: Ardhi Lukianto
Latest version: 0.6.11

# @rappopo/dab-memory

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for in-memory datastore, powered by [Lodash](https://lodash.com/) and [lodash-query](https://github.com/kenansulayman/lodash-query).

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-memory
```

And within your script:

```javascript
const DabMemory = require('@rappopo/dab-memory')
const dab = new DabMemory()
// prepare collections
dab.createCollection({ name: 'test' })
  .then(result => {
    return dab.bulkCreate(data, { collection: 'test' })
  })
...
// lets dab!
dab.findOne('my-doc', 'test').then(function(doc) { ... })
```

## Options

Currently, no options necessary.

## Features

Data is internally saved as collections as follows:

```javascript
dab.data.<collection-name> = [
  { _id: "key1", name: "name1", ... },
  { _id: "key2", name: "name2", ... }
]
```

To enforce structured data throughout DAB and use features provided by collections, you need to `createCollection ()` with your custom fields as [explained here](https://books.rappopo.com/dab/method/create-collection/)

* [x] [find](https://books.rappopo.com/dab/method/find/)
* [x] [findOne](https://books.rappopo.com/dab/method/find-one/)
* [x] [create](https://books.rappopo.com/dab/method/create/)
* [x] [update](https://books.rappopo.com/dab/method/update/)
* [x] [remove](https://books.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://books.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://books.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://books.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://books.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://books.rappopo.com/dab/method/copy-to/)
* [x] [createCollection](https://books.rappopo.com/dab/method/create-collection/)
* [x] [renameCollection](https://books.rappopo.com/dab/method/rename-collection/)
* [x] [removeCollection](https://books.rappopo.com/dab/method/remove-collection/)

## Donation
* [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/ardhilukianto)
* Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

[MIT](LICENSE.md)
npm package: @rappopo/dab-mongo
Description: A MongoDB data access layer for @rappopo/dab
Author: Ardhi Lukianto
Latest version: 0.6.5

# @rappopo/dab-mongo

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for MongoDB. 

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-mongo
```

And within your script:

```javascript
const DabMongo = require('@rappopo/dab-mongo')
const dab = new DabMongo({
  url: 'mongodb://localhost:27017',
  dbName: 'mydb'
})
// prepare collections
dab.createCollection({ name: 'test' })
  .then(result => {
    return dab.bulkCreate(data, { collection: 'test' })
  })
...
// lets dab!
dab.findOne('my-doc', 'test').then(function(doc) { ... })
```

## Options

`url`: your MongoDB url endpoint. If it not provided, it defauts to: *mongodb://localhost:27017*

`dbName`: the database name. You'll most likely want to give a custom name, otherwise it defaults to *test*

## Features

* [x] [find](https://docs.rappopo.com/dab/method/find/)
* [x] [findOne](https://docs.rappopo.com/dab/method/find-one/)
* [x] [create](https://docs.rappopo.com/dab/method/create/)
* [x] [update](https://docs.rappopo.com/dab/method/update/)
* [x] [remove](https://docs.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://docs.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://docs.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://docs.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://docs.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://docs.rappopo.com/dab/method/copy-to/)
* [x] [createCollection](https://docs.rappopo.com/dab/method/create-collection/)
* [x] [renameCollection](https://docs.rappopo.com/dab/method/rename-collection/)
* [x] [removeCollection](https://docs.rappopo.com/dab/method/remove-collection/)

## Misc

* [ChangeLog](CHANGELOG.md)
* Donation: Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

(The MIT License)

Copyright © 2017 Ardhi Lukianto <ardhi@lukianto.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @rappopo/dab-ne
Description: A NeDB data access layer that is so stupid!
Author: Ardhi Lukianto
Latest version: 0.0.6

# @rappopo/dab-ne

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for NeDB. 

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-ne
```

And within your script:

```javascript
const DabNe = require('@rappopo/dab-ne')
const dab = new DabNe({
  path: '/path/to/nedb',
  dbName: 'mydb'
})
...
dab.findOne('my-doc').then(function(doc) { ... })
```

## Options

`path`: the path where all NeDB files will be saved and reside. If it not provided, it'll defaults to */tmp*

`dbName`: the database name. You'll most likely want to give a custom name, otherwise it defaults to *test*

`inMemory`: if it *true*, data won't be persisted. Defaults to *false* 

## Features

* [x] [find](https://docs.rappopo.com/dab/method/find/)
* [x] [findOne](https://docs.rappopo.com/dab/method/find-one/)
* [x] [create](https://docs.rappopo.com/dab/method/create/)
* [x] [update](https://docs.rappopo.com/dab/method/update/)
* [x] [remove](https://docs.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://docs.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://docs.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://docs.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://docs.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://docs.rappopo.com/dab/method/copy-to/)

## Misc

* [ChangeLog](CHANGELOG.md)
* Donation: Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

(The MIT License)

Copyright © 2017 Ardhi Lukianto <ardhi@lukianto.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @rappopo/dab-pouch
Description: A PouchDB data access layer for @rappopo/dab
Author: Ardhi Lukianto
Latest version: 0.6.8

# @rappopo/dab-pouch

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for PouchDB.

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-pouch
```

And within your script:

```javascript
const DabPouch = require('@rappopo/dab-pouch')
const dab = new DabPouch({
  path: '/home/me/pouchdb'
})
// prepare collections
dab.createCollection({ name: 'test' })
  .then(result => {
    return dab.bulkCreate(data, { collection: 'test' })
  })
...
// lets dab!
dab.findOne('my-doc', 'test').then(function(doc) { ... })
```

## Options

`path`: the path where all PouchDB folder will be saved and reside. If it not provided, it'll defaults to */tmp*

`retainOnRemove`: array of columns to retain when a document is deleted. Default: [].

When PouchDB delete a document, it actually PUTs a document with content like this:

```javascript
{
  "_id": "<doc_id>",
  "_rev": "<rev_id>",
  "_deleted": true
}
```

But sometimes you want to also have some columns to be put on that deleted document. The `retainOnRemove` simply left those columns intact, e.g:

```javascript
{
  "_id": "<doc_id>",
  "_rev": "<rev_id>",
  "_deleted": true,
  "type": "<mytype>"
}
```

## Features

* [x] [find](https://books.rappopo.com/dab/method/find/)
* [x] [findOne](https://books.rappopo.com/dab/method/find-one/)
* [x] [create](https://books.rappopo.com/dab/method/create/)
* [x] [update](https://books.rappopo.com/dab/method/update/)
* [x] [remove](https://books.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://books.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://books.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://books.rappopo.com/dab/method/bulk-remove/)
* [x] [copyFrom](https://books.rappopo.com/dab/method/copy-from/)
* [x] [copyTo](https://books.rappopo.com/dab/method/copy-to/)
* [x] [createCollection](https://books.rappopo.com/dab/method/create-collection/)
* [ ] [renameCollection](https://books.rappopo.com/dab/method/rename-collection/)
* [x] [removeCollection](https://books.rappopo.com/dab/method/remove-collection/)

## Donation
* [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/ardhilukianto)
* Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

[MIT](LICENSE.md)
npm package: @rappopo/dab-redis
Description: A Redis data access layer that'll pissed you off!
Author: Ardhi Lukianto
Latest version: 0.0.5

# @rappopo/dab-redis

A [Rappopo DAB](https://github.com/rappopo/dab) implementation for [Redis](https://redis.io). 

## Installation

Simply invoke this command in your project folder:

```
$ npm install --save @rappopo/dab-redis
```

And within your script:

```javascript
const DabRedis = require('@rappopo/dab-redis')
const dab = new DabRedis({
  url: 'redis://myhost:6379',
  ns: 'docs'
})
...
dab.findOne('my-doc').then(function(doc) { ... })
```

## Options

`url`: your Redis url endpoint. If it not provided, it defauts to: *redis://localhost:6379*

`ns`: your namespace. You'll most likely want to give a custom name, otherwise it defaults to *doc*

## Features

* [ ] [find](https://docs.rappopo.com/dab/method/find/)
* [x] [findOne](https://docs.rappopo.com/dab/method/find-one/)
* [x] [create](https://docs.rappopo.com/dab/method/create/)
* [x] [update](https://docs.rappopo.com/dab/method/update/)
* [x] [remove](https://docs.rappopo.com/dab/method/remove/)
* [x] [bulkCreate](https://docs.rappopo.com/dab/method/bulk-create/)
* [x] [bulkUpdate](https://docs.rappopo.com/dab/method/bulk-update/)
* [x] [bulkRemove](https://docs.rappopo.com/dab/method/bulk-remove/)
* [ ] [copyFrom](https://docs.rappopo.com/dab/method/copy-from/)
* [ ] [copyTo](https://docs.rappopo.com/dab/method/copy-to/)

## Misc

* [ChangeLog](CHANGELOG.md)
* Donation: Bitcoin **16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y**

## License

(The MIT License)

Copyright © 2017 Ardhi Lukianto <ardhi@lukianto.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @raprincis/messaging-handler
Description: Pub/Sub to Solace Event Handler
Author: Princis RAKOTOMANGA
Latest version: 0.1.2

# Solace Event Handler
Permit to Pub Sub to Solace Event broker

## Use
### Use Factory Method
```ts

    import { MessagingConnectionOptions, MessagingEventHandlers, MessagingFactory, MessagingOptions, MessagingType } from "../lib/Messaging.js";

    const defaultConnection: MessagingConnectionOptions = {
        clientId: 'raprincis',
        hostname: process.env.SOLACE_HOSTNAME,
        port: parseInt(process.env.SOLACE_AMQP_PORT, 10),
        username: process.env.SOLACE_USERNAME,
        password: process.env.SOLACE_PASSWORD,
    }

    const createHandler  = (messagingType: MessagingType): MessagingEventHandlers => ({
        connected () {
            console.log(`[${messagingType}] - Connected`);
        },
        subscribed({ name, type }) {
            console.log(`[${messagingType}] - Subscribed to ${type} ${name}`)
        },
        message({ subscription, payload }) {
            console.log(`[${messagingType}] - Message happens on ${subscription.name} : ${payload.toString()}`);
        }
    })


    const amqp = await MessagingFactory.create("AMQP", {
        ...defaultConnection,
        subscriptions: [{
            name: 'myQueue', type: 'queue'
        }, {
            name: 'weather', type: 'topic'
        }],
        handlers: createHandler("AMQP")
    })

    const mqtt = await MessagingFactory.create("MQTT", {
        ...defaultConnection,
        port: parseInt(process.env.SOLACE_MQTT_PORT, 10),
        subscriptions: ["try-me"],
        handlers: createHandler("MQTT")
    })

```
npm package: @raprincis/service-broker
Description: Osb api broker
Author: Princis RAKOTOMANGA
Latest version: 1.0.1

# Service Broker

## Initialize a Service broker

```ts
const broker = Broker.create({
  // This must correspond to the credential when createing the OSB in CF
  withAuthentication: 'Basic someauthentication', 
  services: [new OsbService({
    id: 'fbb89e27-8b39-4aa4-b00a-415326185ea9',
    name: 'date-utilities',
    description: "Date",
    instances_retrievable: true,
    bindable: true,
    plans: [{
      id: 'd226e953-dcd6-4bf8-aa63-12ba196b7fb1',
      name: 'free-plan',
      description: 'A free plan',
      free: true
    }]
  })]
})

const PORT = Number(process.env.PORT || '3000')
const app = express()

app
  .use('/broker', broker.handler)
  .listen(PORT)

```

## Intercept call
For this case, extends the class __OsbService__ 

```ts
class DateService extends OsbService {
  
  // Handle Provision request
  provision(request: ProvisionRequest<CreateProvisioning<Record<string, any>>>): Provision {
    return {
      dashboard_url : 'http://localhost:3000/dashboard'
    }
  }
}


const dateService = new DateService({ /** Your configuration here */})
```
npm package: @raprincis/utilities
Description: Some utilities functions
Author: Princis RAKOTOMANGA
Latest version: 0.1.0

# Utilities
These are some utilities function or Classes that I use

## Event Emitter
This is a simple Typed Event Emitter
```ts
    import { EventEmitter } from "@raprincis/utilities"

    type EventMap = {
        connected : []
    }

    // Declare Class with 
    export default class MyClass extends EventEmitter<EventMap> {}

    // Somewhere in code
    const instance = MyClass()
    instance.on("connected", () => { /** */ })

```