node-rsvg-prebuilt icon indicating copy to clipboard operation
node-rsvg-prebuilt copied to clipboard

Add flags

Open hansottowirtz opened this issue 5 years ago • 0 comments

Hello, I'd like to add flags to the Rsvg constructor:

new Rsvg({keepImageData: true, unlimited: false}); 

But if I try to refer to ARGVAR[0] in https://github.com/f3lang/node-rsvg-prebuilt/blob/master/src/Rsvg.cc#L93, it's always empty:

Nan::MaybeLocal<v8::Object> flagsObject = Nan::To<v8::Object>(ARGVAR[0]);
if (flagsObject.IsEmpty()) {
    printf("No flags given\n");
} else {
    printf("Flags given\n");
}

This always returns No flags given. Can you help me out here? I'm not very familiar with Nan.

hansottowirtz avatar Dec 01 '19 21:12 hansottowirtz