Repository navigation
Conversation
There was a problem hiding this comment.
correct but you should use Nan::Set(target, Nan::New<String>("StringPrep").ToLocalChecked(), t->GetFunction()); now for max-compatibility
|
+1 Need this very much. Looking to moving to Node 4.1.0. |
|
👍 |
|
👍 as well! Thank you for your efforts! |
|
@rvagg is usually very helpful with |
|
The Nan2 support that @erulabs has started is looking pretty good so far. |
There was a problem hiding this comment.
can be removed from inside all NAN_*() methods
|
You rule @rvagg, thanks! |
There was a problem hiding this comment.
../node-stringprep.cc: In static member function ‘static void StringPrep::Initialize(v8::Handle<v8::Object>)’:
../node-stringprep.cc:24:50: error: ‘NanAssignPersistent’ was not declared in this scope
NanAssignPersistent(stringprep_constructor, t);
There was a problem hiding this comment.
stringprep_constructor needs to be declared as a Nan::Persistent now (instead of just Persistent, i.e. v8::Persistent) and then you use stringprep_constructor.Reset(t) here
There was a problem hiding this comment.
../node-stringprep.cc: In member function ‘v8::Local<v8::Value> StringPrep::prepare(v8::String::Value&)’:
../node-stringprep.cc:115:5: error: expected initializer before ‘size_t’
size_t destLen = str.length() + 1;
|
Hey @sonnyp looks like a missing semicolon on line #114 The remaining issue seems to be how we return the value (lines 228 & 279): Local result = Nan::New(dest, destLen).ToLocalChecked(); This passes tests, but appears to break the unicode/ascii conversion. I tried a handful of ideas without much results. +1 to big big thanks to @rvagg 💃 |
https://github.com/node-xmpp/node-stringprep/pull/72/files#diff-4e17e0441c265ec99c496bc09f563bc2R228 |
WIP; could use some help