# jql-tools

> A set of tools for writing Mixpanel JQL queries

Latest version **1.1.0** (published 2016-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install jql-tools
pnpm add jql-tools
yarn add jql-tools
bun add jql-tools
```

## 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.1.0 |
| Published | 2016-05-20 |
| First published | 2016-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jessepollak |
| Maintainers | jessepollak |

## Links

- npm: https://www.npmjs.com/package/jql-tools
- Repository: https://github.com/clef/jql-tools
- Homepage: https://github.com/clef/jql-tools#readme
- Issues: https://github.com/clef/jql-tools/issues
- npm.io page: https://npm.io/package/jql-tools

## Recent versions

- 1.1.0 (latest) — 2016-05-20
- 1.0.0 — 2016-05-13

## README

# jql-tools

![Build Status](https://img.shields.io/travis/clef/jql-tools.svg)
![Downloads](https://img.shields.io/npm/dm/.svg)
![Downloads](https://img.shields.io/npm/dt/.svg)
![npm version](https://img.shields.io/npm/v/.svg)
![dependencies](https://img.shields.io/david/clef/jql-tools.svg)
![dev dependencies](https://img.shields.io/david/dev/clef/jql-tools.svg)
![License](https://img.shields.io/github/license/clef/jql-tools.svg)

A set of tools for writing Mixpanel JQL queries

## Installation

Install it via npm:

```shell
npm install
```

## Usage

```javascript
import { helpers } from 'jql-tools';

function main () {
  return Events({
    from_date: helpers.DateHelper.formatDate(params.fromDate),
    to_date: helpers.DateHelper.formatDate(params.toDate),
    event_selectors: params.events
  })
  .groupByUser([event => {
    return new Date(event.time).toISOString().substr(0, 10)
  }], mixpanel.reducer.noop())
  .groupBy(['key.1'], mixpanel.reducer.count())
}

export default main
```

### helpers

A collection of helpers for writing JQL queries.

#### helpers.DateHelper

#### helpers.EventHelper

### types

A collection of events for writing JQL queries.

#### types.Event

A class that represents a JQL event in Mixpanel.

## Development

To start development, run:

```shell
git clone git@github.com:clef/jql-tools.git jql-tools
cd jql-tools
npm install
npm run test
```


## License

MIT

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