open-index/open-npm huggingface dataset:
npm package: @rabbotio/cryptox
Description: Crypto exchange parser and adapter for latest price
Author: katopz
Latest version: 0.3.0

# cryptox
[WIP] Crypto exchange parser and adapter for latest price

## Example
> See examples/index.ts
```js
import Cryptox from '@rabbotio/cryptox'

(async () => {
  // Get each symbol
  Cryptox.getPrice('bx', 'OMG', 'THB').then(data => console.log(`BX:OMG_THB = ${data.last}`))
  Cryptox.getPrice('binance', 'OMG', 'ETH').then(data => console.log(`Binance:OMG_ETH = ${data.last}`))
  Cryptox.getPrice('cex', 'ETH', 'USD').then(data => console.log(`CEX:OMG_USD = ${data.last}`))

  // Get all price and cached
  await Cryptox.fetchAndCache('bx')// TODO : , 'binance', 'cex')
    Cryptox.getCachedPrice('bx', 'OMG', 'THB').then(data => console.log(`BX:OMG_THB = ${data.last}`))
    Cryptox.getCachedPrice('bx', 'THB', 'OMG').then(data => console.log(`BX:THB_OMG = ${data.last}`))
  })()
```

## TODO
- [ ] fetchAndCache `binance`, `cex`
- [ ] getPrices
npm package: @rabbotio/daemon
Description: Add-on for creating *nix daemons
Author: katopz
Latest version: 1.1.0

# daemon

[![Build Status](https://secure.travis-ci.org/indexzero/daemon.node.png)](http://travis-ci.org/indexzero/daemon.node)

Turn a node script into a daemon.

## install via npm

```
npm install daemon
```

Requires node >= 0.8

## examples

```javascript
// this code is run twice
// see implementation notes below
console.log(process.pid);

// after this point, we are a daemon
require('daemon')();

// different pid because we are now forked
// original parent has exited
console.log(process.pid);
```

## api

### daemon(opt)

Respawn the process (self) as a daemon. The parent process will exit at the point of this call.
`opt` parameter see below.

### daemon.daemon(script, args, opt)

Spawn the `script` with given `args` array as a daemonized process. Return the `child` process object.

opt can optionally contain the following arguments:
* stdout (file descriptor for stdout of the daemon)
* stderr (file descriptor for stderr of the daemon)
* env (environment for the daemon) (default: process.env)
* cwd (current working directory for daemonized script) (default: process.cwd)

## implementation notes

Daemon actually re-spawns the current application and runs it again. The only difference between the original and the fork is that the original will not execute past the `daemon()` call whereas the fork will.

## node versions prior to 0.8

Using this module on older versions of node (or older versions of this module) are not recommended due to how node works internally and the issues it can cause for daemons.

## Contributors
[Charlie Robbins](http://nodejitsu.com)  
[Pedro Teixeira](https://github.com/pgte)  
[James Halliday](https://github.com/substack)  
[Zak Taylor](https://github.com/dobl)  
[Daniel Bartlett](https://github.com/danbuk)  
[Charlie McConnell](https://github.com/AvianFlu)  
[Slashed](http://github.com/slashed)  
[Roman Shtylman](http://github.com/shtylman)
npm package: @rabbotio/fetcher
Description: Simply fetch get/post as json
Author: katopz
Latest version: 1.6.0

# fetcher
Simply fetch get/post as json

```js
import { getJSON, postJSON } from '@rabbotio/fetcher'

// get JSON
const json = await getJSON(`https://bx.in.th/api/`)
console.log(json)

// post JSON with params
const json = await postJSON(`${this.facebookURL}?access_token=${accessToken}`, {
  recipient: {
    id: recipientId
  },
  message: {
    text: messageText
  }
})
console.log(json)

// get JSON with params
const json = await getJSON(`https://bx.in.th/api/tradehistory/`, {
  pairing: 1,
  date: '2017-12-12'
})
console.log(json)

// passing headers
const json = await postJSON('https://api.line.me/v2/bot/message/reply', {
    replyToken: replyToken,
    messages: messages
  }, {
  'Authorization': `Bearer ${accessToken}`,
})
console.log(json)
```
npm package: @rabbotio/noconsole
Description: Not only console, it's also awesome!
Author: katopz
Latest version: 1.1.0

# noconsole
Not only console, it's also awesome!

![image](https://user-images.githubusercontent.com/97060/32830000-6c818a94-ca26-11e7-8a37-4f7e1ab16346.png)

## How to use
> Add this ti highest file as possible e.g. `index.js`, it'll patch console with awesome color
```shell
require('@rabbotio/noconsole')
```
npm package: @rabbotio/rainbow
Description: Pigato GraphQL wrapper for lazy dude
Author: katopz
Latest version: 1.6.1

# rainbow
[Pigato](https://github.com/prdn/pigato) GraphQL wrapper for lazy dude 🌈

## Overview

### Announce Services
```
Broker (Services Directory) <--- Worker (Service)
```

### Client Request
```
Client (GraphQL) ---> Broker ---> Worker ---> Server (GraphQL)
```
### Worker Reply
```
Client (GraphQL) <--- Broker <--- Worker ---> Server (GraphQL)
```

## Setup (macOS)
```shell
brew install zeromq
```

## Setup (Ubuntu16)
```shell
# Ubuntu 16, for node-gyp
apt install -y make g++

# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz

# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz

# Install dependency
sudo apt-get update && \
sudo apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev

# Create make file
cd zeromq-4.2.2
./configure

# Build and install(root permission only)
sudo make install

# Install zeromq driver on linux
sudo ldconfig

# Check installed
ldconfig -p | grep zmq
```

## How to use
- See test folder, more example

## Test
```shell
npm test
```
## TODO
- [ ] Secure
- [ ] Monitoring
- [ ] Alert
- [ ] Simple example

## TOTEST
- [ ] 1 client, 1 broker, 1 worker
- [ ] 1 client, 1 broker, 2 workers
- [ ] 2 clients, 1 broker,1 worker
- [ ] 2 clients, 1 broker,2 workers
- [ ] 1 client, 2 brokers, 1 worker
- [ ] 1 client, 2 brokers, 2 workers
- [ ] 2 clients, 2 brokers,1 worker
- [ ] 2 clients, 2 brokers,2 workers
npm package: @rabby-wallet/electron-chrome-context-menu
Description: Chrome context menu for Electron browsers
Author: Samuel Maddock
Latest version: 1.1.1

# electron-chrome-context-menu

> Chrome context menu for Electron browsers

Building a modern web browser requires including many features users have grown accustomed to. Context menus are a small, but noticeable feature when done improperly.

This module aims to provide a context menu with close to feature parity to that of Google Chrome.

## Install

> npm install electron-chrome-context-menu

## Usage

```ts
// ES imports
import buildChromeContextMenu from 'electron-chrome-context-menu'
// CommonJS
const buildChromeContextMenu = require('electron-chrome-context-menu').default

const { app } = require('electron')

app.on('web-contents-created', (event, webContents) => {
  webContents.on('context-menu', (e, params) => {
    const menu = buildChromeContextMenu({
      params,
      webContents,
      openLink: (url, disposition) => {
        webContents.loadURL(url)
      }
    })

    menu.popup()
  })
})
```

> For a complete example, see the [`electron-browser-shell`](https://github.com/samuelmaddock/electron-browser-shell) project.

## API

### `buildChromeContextMenu(options)`

* `options` Object
  * `params` Electron.ContextMenuParams - Context menu parameters emitted from the WebContents 'context-menu' event.
  * `webContents` Electron.WebContents - WebContents which emitted the 'context-menu' event.
  * `openLink(url, disposition, params)` - Handler for opening links.
    * `url` String
    * `disposition` String - Can be `default`, `foreground-tab`, `background-tab`, and `new-window`.
    * `params` Electron.ContextMenuParams
  * `extensionMenuItems` Electron.MenuItem[] (optional) - Collection of menu items for active web extensions.
  * `labels` Object (optional) - Labels used to create menu items. Replace this if localization is needed.

## License

MIT