<commit_before>#include "SmartCardWrapper.hh"

#include <nan.h>

namespace helios
{

NAN_MODULE_INIT(ModuleInit)
{
    auto cls = "SmartCardReader";
    auto tpl = Nan::New<v8::FunctionTemplate>(SmartCardWrapper::New);

    tpl->SetClassName(Nan::New(cls).ToLocalChecked());
    tpl->InstanceTemplate()->SetInternalFieldCount(1);

    SetPrototypeMethod(tpl, "poll", SmartCardWrapper::Poll);
    SetPrototypeMethod(tpl, "query", SmartCardWrapper::Query);

    Nan::Set(target, Nan::New(cls).ToLocalChecked(), tpl->GetFunction());
};

}

NODE_MODULE(SmartCardReader, helios::ModuleInit)<commit_msg>Expose setup and reconnect in SmartCardModule.cc<commit_after>#include "SmartCardWrapper.hh"

#include <nan.h>

namespace helios
{

NAN_MODULE_INIT(ModuleInit)
{
    auto cls = "SmartCardReader";
    auto tpl = Nan::New<v8::FunctionTemplate>(SmartCardWrapper::New);

    tpl->SetClassName(Nan::New(cls).ToLocalChecked());
    tpl->InstanceTemplate()->SetInternalFieldCount(1);

    SetPrototypeMethod(tpl, "poll", SmartCardWrapper::Poll);
    SetPrototypeMethod(tpl, "query", SmartCardWrapper::Query);
    SetPrototypeMethod(tpl, "setup", SmartCardWrapper::Setup);
    SetPrototypeMethod(tpl, "release", SmartCardWrapper::Release);

    Nan::Set(target, Nan::New(cls).ToLocalChecked(), tpl->GetFunction());
};

}

NODE_MODULE(SmartCardReader, helios::ModuleInit)
{'fraction_non_alphanumeric': 0.15526122148638705, 'fraction_numerical': 0.0029433406916850625, 'mean_word_length': 6.953216374269005, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '6507595', 'n_tokens_mistral': 456, 'n_tokens_neox': 446, 'n_words': 62}