jql-tools
v1.1.0
Published
A set of tools for writing Mixpanel JQL queries
Downloads
35
Readme
jql-tools
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 [email protected]:clef/jql-tools.git jql-tools
cd jql-tools
npm install
npm run test
License
MIT