# twitch-irc-db

> Local database module for twitch-irc.

Latest version **1.0.0** (published 2015-02-26) · 0 weekly downloads

## Install

```sh
npm install twitch-irc-db
pnpm add twitch-irc-db
yarn add twitch-irc-db
bun add twitch-irc-db
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-02-26 |
| First published | 2015-02-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Schmoopiie |
| Maintainers | schmoopiie |
| Keywords | irc, twitch, bot, lib, library, stream, live, robot, twitchtv, twitch.tv, node, iojs, database, db, local |

## Links

- npm: https://www.npmjs.com/package/twitch-irc-db
- Repository: https://github.com/twitch-irc/twitch-irc-db
- Issues: https://github.com/twitch-irc/twitch-irc-db/issues
- npm.io page: https://npm.io/package/twitch-irc-db

## Dependencies (2)

- [q](https://npm.io/package/q.md) ^1.2.0
- [locallydb](https://npm.io/package/locallydb.md) 0.0.5

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-02-26

## README

# twitch-irc-db
[![Npm Version](http://img.shields.io/npm/v/twitch-irc-db.svg?style=flat)](https://www.npmjs.org/package/twitch-irc-db) [![Issues](http://img.shields.io/github/issues/twitch-irc/twitch-irc-db.svg?style=flat)](https://github.com/twitch-irc/twitch-irc-db/issues)

![](http://i.imgur.com/7PMEvN5.png)
Twitch is a trademark or registered trademark of Twitch Interactive, Inc. in the U.S. and/or other countries. "Twitch-IRC" is not operated by, sponsored by, or affiliated with Twitch Interactive, Inc. in any way.

## Install

```bash
$ npm install --save twitch-irc-db
```

## Configuration

You can either pass the client instance as a parameter or an object, as long as it contains the ``database`` object, which is the path to your local database. Not using any parameter will results as the default path, which is ``./database``.

```javascript
var clientOptions = {
    options: {
        exitOnError: false,
        database: './data',
    },
    channels: ['schmoopiie']
};

var client = new irc.client(clientOptions);
var db     = require('twitch-irc-db')(client);
//var db   = require('twitch-irc-db')(clientOptions);        <- Also works!
//var db   = require('twitch-irc-db')({database: './data'}); <- Also works!

db.insert('monsters', [
    {name: "sphinx", mythology: "greek", eyes: 2, sex: "f", hobbies: ["riddles","sitting","being a wonder"]},
    {name: "hydra", mythology: "greek", eyes: 18, sex: "m", hobbies: ["coiling","terrorizing","growing"]},
    {name: "huldra", mythology: "norse", eyes: 2, sex: "f", hobbies: ["luring","terrorizing"]},
    {name: "cyclops", mythology: "greek", eyes: 1, sex: "m", hobbies: ["staring","terrorizing"]},
    {name: "fenrir", mythology: "norse", eyes: 2, sex: "m", hobbies: ["growing","god-killing"]},
    {name: "medusa",  mythology: "greek", eyes: 2, sex: "f", hobbies: ["coiling","staring"]}
]).then(function () {
    console.log('Inserted data.');
});
```

## Contributing Guidelines

Please review the [guidelines for contributing](https://github.com/twitch-irc/twitch-irc-db/blob/master/CONTRIBUTING.md) to this repository.

## Support

Feel free to [create an issue](https://github.com/twitch-irc/twitch-irc-db/issues/new). We are active on the development of twitch-irc and it's modules and we respond to each and every issues. When submitting an issue, please include your Node/NPM versions, your operating system and the log file or the error message. Please, do your best to explain how to reproduce the issue.

## License

The MIT License (MIT)

Copyright (c) 2015 Schmoopiie

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 NON INFRINGEMENT. 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.

---
_Source: https://npm.io/package/twitch-irc-db · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
