<commit_before>#include "edge.h"

v8::Local<v8::String> stringCLR2V8(MonoString* text)
{
    Nan::EscapableHandleScope scope;
    return scope.Escape(Nan::New<v8::String>(
        mono_string_chars(text),
        mono_string_length(text)).ToLocalChecked());
}

MonoString* stringV82CLR(v8::Handle<v8::String> text)
{
    Nan::HandleScope scope;
    v8::String::Utf8Value utf8text(v8::Isolate::GetCurrent(), text);
    return mono_string_new(mono_domain_get(), *utf8text);    
}

MonoString* exceptionV82stringCLR(v8::Handle<v8::Value> exception)
{
    Nan::HandleScope scope;
    if (exception->IsObject())
    {
        v8::Handle<v8::Value> stack = exception->ToObject(Nan::GetCurrentContext()).ToLocalChecked()->Get(Nan::New<v8::String>("stack").ToLocalChecked());
        if (stack->IsString())
        {
            return stringV82CLR(stack->ToString());
        }
    }

    return stringV82CLR(v8::Handle<v8::String>::Cast(exception));
}<commit_msg>updating code to remove deprecation warnings<commit_after>#include "edge.h"

v8::Local<v8::String> stringCLR2V8(MonoString* text)
{
    Nan::EscapableHandleScope scope;
    return scope.Escape(Nan::New<v8::String>(
        mono_string_chars(text),
        mono_string_length(text)).ToLocalChecked());
}

MonoString* stringV82CLR(v8::Handle<v8::String> text)
{
    Nan::HandleScope scope;
    v8::String::Utf8Value utf8text(text);
    return mono_string_new(mono_domain_get(), *utf8text);    
}

MonoString* exceptionV82stringCLR(v8::Handle<v8::Value> exception)
{
    Nan::HandleScope scope;
    if (exception->IsObject())
    {
        v8::Handle<v8::Value> stack = exception->ToObject(Nan::GetCurrentContext()).ToLocalChecked()->Get(Nan::New<v8::String>("stack").ToLocalChecked());
        if (stack->IsString())
        {
            return stringV82CLR(stack->ToString());
        }
    }

    return stringV82CLR(v8::Handle<v8::String>::Cast(exception));
}
{'fraction_non_alphanumeric': 0.16527632950990614, 'fraction_numerical': 0.027632950990615225, 'mean_word_length': 4.6943620178041545, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 27, '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': '3261688', 'n_tokens_mistral': 688, 'n_tokens_neox': 661, 'n_words': 80}