<commit_before>/*
 *  How to use this module stand-alone
 */

try {
    var model = require('homestar-lg-smart-tv')
} catch (x) {
    var model = require('../index')
}

var _ = model.homestar._;

wrapper = model.wrap("LGSmartTV");
wrapper.on('model', function(model) {
    model.on("state", function(model) {
        console.log("+ state\n ", model.state());
    });
    model.on("meta", function(model) {
        console.log("+ meta\n ", _.ld.compact(model.meta().state()));
    });
    model.set('mute', false);
    model.set('volume', 35);
    model.set('band', "hdmi1");
    
    console.log("+ discovered\n ", _.ld.compact(model.meta().state()), "\n ", model.thing_id());
})
<commit_msg>use 'on thing' rather than model<commit_after>/*
 *  How to use this module stand-alone
 */

try {
    var model = require('homestar-lg-smart-tv')
} catch (x) {
    var model = require('../index')
}

var _ = model.homestar._;

wrapper = model.wrap("LGSmartTV");
wrapper.on('thing', function(model) {
    model.on("state", function(model) {
        console.log("+ state\n ", model.state());
    });
    model.on("meta", function(model) {
        console.log("+ meta\n ", _.ld.compact(model.meta().state()));
    });
    model.set('mute', false);
    model.set('volume', 35);
    model.set('band', "hdmi1");
    
    console.log("+ discovered\n ", _.ld.compact(model.meta().state()), "\n ", model.thing_id());
})

{'fraction_non_alphanumeric': 0.22238061297220243, 'fraction_numerical': 0.0042765502494654314, 'mean_word_length': 3.1538461538461537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3257276', 'n_tokens_mistral': 494, 'n_tokens_neox': 481, 'n_words': 91}