<commit_before>Events in Altair
===

The event system in Altair is a tad more powerful than any event system you're used to. That is because this version
is backed by [underscore-query](https://github.com/davidgtonge/underscore-query). This powerful query engine gives us
the ability to trigger event listeners selectively.

    /**
     * Altair has 2 ways to set listeners, the fun way is .on(eventName, query).then(...
     */
    this.nexus('Altair:Jarvis').on('DID_GESTURE', { 'gesture.type': 'the-force' }).then(function (e) {

        var device = e.get('device');

    });

    /**
     * The normal boring way is on(eventName, callback, query)
     */
    this.nexus('Altair:Jarvis').on('DID_GESTURE', function (e) {

        var device = e.get('device');

    }, { 'gesture.type': 'the-force' });



The examples above are powerful because it shows how to hook into any device that could possibly emit "the-force" gesture.
To see all the ways you can query, use the link to underscore-query above (Note: ignore the chain'able API, you will not
be writing much code for event listeners, you will be setting them up inside your config/listeners.json.<commit_msg>readme update<commit_after>Events in Altair
===

The event system in Altair is a tad more powerful than any event system you're used to. That is because this version
is backed by [underscore-query](https://github.com/davidgtonge/underscore-query). This powerful query engine gives us
the ability to trigger event listeners selectively.

    /**
     * Altair has 2 ways to set listeners, the chain'able way is .on(eventName, query).then(...
     */
    this.nexus('Altair:Jarvis').on('DID_GESTURE', { 'gesture.type': 'the-force' }).then(function (e) {

        var device = e.get('device');

    });

    /**
     * The normal boring way is on(eventName, callback, query)
     */
    this.nexus('Altair:Jarvis').on('DID_GESTURE', function (e) {

        var device = e.get('device');

    }, { 'gesture.type': 'the-force' });



The examples above are powerful because it shows how to hook into any device that could possibly emit "the-force" gesture.
To see all the ways you can query, use the link to underscore-query above (Note: ignore the chain'able API, you will not
be writing much code for event listeners, you will be setting them up inside your config/listeners.json.
{'fraction_non_alphanumeric': 0.11291009799744355, 'fraction_numerical': 0.0008521516829995739, 'mean_word_length': 3.5328185328185326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7127588', 'n_tokens_mistral': 700, 'n_tokens_neox': 681, 'n_words': 274}