Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thlorenz/hhp-log
Stores Poker hands parsed with hhp in an append-only log.
https://github.com/thlorenz/hhp-log
Last synced: 13 days ago
JSON representation
Stores Poker hands parsed with hhp in an append-only log.
- Host: GitHub
- URL: https://github.com/thlorenz/hhp-log
- Owner: thlorenz
- License: mit
- Created: 2016-11-24T03:08:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T20:14:07.000Z (almost 8 years ago)
- Last Synced: 2024-12-10T08:26:14.040Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://github.com/thlorenz/hhp-log
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hhp-log [![build status](https://secure.travis-ci.org/thlorenz/hhp-log.png)](http://travis-ci.org/thlorenz/hhp-log)
Stores Poker hands parsed with hhp in an append-only log or just into levelup in protobuffer format (schema provided) or
any format you like.Ensures that no hand is added twice.
## Server Side using HyperLog Store backed by LevelDown
```js
const hhplog = require('hhp-log')
const path = require('path')const leveldown = require('leveldown')
const location = path.join(__dirname, '..', 'tmp', 'log-db')
const encoding = require('hhp-log/default-encoding')const HyperLog = require('hhp-log/stores/hyperlog')
const store = new HyperLog({ location, leveldown, encoding })
const pokerLog = hhplog({ log: store })
```## Client Side using LevelUp Store backed by FruitDown
```js
const hhplog = require('hhp-log')
const LevelUp = require('hhp-log/stores/levelup')
const fruitdown = require('fruitdown')
const opts = {
leveldown: fruitdown
, location: 'pokerhands:parsed'
, encoding: require('hhp-log/default-encoding')
}
const store = new LevelUp(opts)
const pokerLog = hhplog({ log: store })
```## Status
Working (manually checked via ./tools), but needs tests.
## Installation
npm install hhp-log
## API
TODO for now see the examples and look through the `./tools`
## License
MIT