Skip to content

clef/jql-tools

Repository files navigation

jql-tools

Build Status Downloads Downloads npm version dependencies dev dependencies License

A set of tools for writing Mixpanel JQL queries

Installation

Install it via npm:

npm install

Usage

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:

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

License

MIT

About

A collection of tools to help with writing Mixpanel JQL queries

Resources

License

Stars

Watchers

Forks

Packages

No packages published