static v8::Handle<v8::Value> New(const v8::Arguments& args) { v8::HandleScope scope; NodeMidiOutput* output = new NodeMidiOutput(); output->Wrap(args.This()); return args.This(); }
static NAN_METHOD(New) { NanScope(); if (!args.IsConstructCall()) { return NanThrowTypeError("Use the new operator to create instances of this object."); } NodeMidiOutput* output = new NodeMidiOutput(); output->Wrap(args.This()); NanReturnValue(args.This()); }