open-index/open-npm huggingface dataset:
npm package: @qxip/influx-line-protocol-parser
Description: Library for parsing InfluxDB's line protocol.
Author: goliatone
Latest version: 0.2.1

# Influx Line Protocol Parser

The line protocol is a text based format for writing points to InfluxDB. This library provides a simple parser to generate a JavaScript Object from a provided line.

## Getting Started
Install the module with: `npm install influx-line-protocol-parser`

## Examples

```js
var lineToJSON = require('influx-line-protocol-parser');
var line = 'cpu_load_short,direction=in,host=server01,region=us-west value=2.0 1422568543702900257';
var point = lineToJSON(line);
console.log(point);
```

```js
{
    measurement: 'cpu_load_short',
    timestamp: 1422568543702900257,
    fields: [{
        value: 2
    }],
    tags:[
        {direction: 'in'},
        {host: 'server01'},
        {region: 'us-west'},
    ]
}
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
* 2016-08-15 v0.1.0: Initial release
* 2016-08-15 v0.2.0: Remove unused bin

## License
Copyright (c) 2016 goliatone  
Licensed under the MIT license.
npm package: @qxip/promql-parser-js
Description: promql parser binding for node
Latest version: 0.2.4

# ⚙️ promql-parser-js
PromQL parsing wasm module based on Rust crate [promql-rs](https://github.com/detailyang/promql-rs)

#### Status
* Experiemental, don't use it!

### Install
```bash
npm install @qxip/promql-parser-js
```

### Functions
- `promql_parse`

#### Usage
```javascript
const { promql_parse } = require("@qxip/promql-parser-js"); // parse PromQL to JSON
const query = 'sum(rate(foo{bar="baz"}[5m])) by (x,y)';
try {
  const parsed = promql_parse(query);
  console.log(parsed);
} catch(e) { console.log(e) }
```

```bash
node js/index.js 'rate(foo{bar="baz"}[5m])'
```
```json
{
  "name": "rate",
  "args": [
    {
      "name": "foo",
      "label_matchers": [
        {
          "op": "Equal",
          "name": "bar",
          "value": "baz"
        }
      ],
      "offset": false,
      "range": "300s"
    }
  ],
  "aggregation": false
}
```

### Build
Rebuild wasm package release. Not needed for regular module usage.
```bash
npm install
npm run build
npm test
```

-------

## TODO
* [x] WASM binding + NODE module
* [ ] Convert `Expr` to json w/o Debug print
* [ ] Implement test cases
* [ ] Document