ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ ## JavaScript-accessible methods A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://github.com/v8/v8/wiki/Embedder%27s-Guide#templates) for further information. In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type. * **Method argument types** - Nan::FunctionCallbackInfo - Nan::PropertyCallbackInfo - Nan::ReturnValue * **Method declarations** - Method declaration - Getter declaration - Setter declaration - Property getter declaration - Property setter declaration - Property enumerator declaration - Property deleter declaration - Property query declaration - Index getter declaration - Index setter declaration - Index enumerator declaration - Index deleter declaration - Index query declaration * Method and template helpers - Nan::SetMethod() - Nan::SetPrototypeMethod() - Nan::SetAccessor() - Nan::SetNamedPropertyHandler() - Nan::SetIndexedPropertyHandler() - Nan::SetTemplate() - Nan::SetPrototypeTemplate() - Nan::SetInstanceTemplate() - Nan::SetCallHandler() - Nan::SetCallAsFunctionHandler() ### Nan::FunctionCallbackInfo `Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist. Definition: ```c++ template class FunctionCallbackInfo { public: ReturnValue GetReturnValue() const; v8::Local Callee(); // NOTE: Not available in NodeJS >= 10.0.0 v8::Local Data(); v8::Local Holder(); bool IsConstructCall(); int Length() const; v8::Local operator[](int i) const; v8::Local This() const; v8::Isolate *GetIsolate() const; }; ``` See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/node-8.16/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods. **Note:** `FunctionCallbackInfo::Callee` is removed in Node.js after `10.0.0` because it is was deprecated in V8. Consider using `info.Data()` to pass any information you need. ### Nan::PropertyCallbackInfo `Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist. Definition: ```c++ template class PropertyCallbackInfo : public PropertyCallbackInfoBase { public: ReturnValue GetReturnValue() const; v8::Isolate* GetIsolate() const; v8::Local Data() const; v8::Local This() const; v8::Local Holder() const; }; ``` See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/node-8.16/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods. ### Nan::ReturnValue `Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.16/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`. Example usage: ```c++ void EmptyArray(const Nan::FunctionCallbackInfo& info) { info.GetReturnValue().Set(Nan::New()); } ``` Definition: ```c++ template class ReturnValue { public: // Handle setters template void Set(const v8::Local &handle); template void Set(const Nan::Global &handle); // Fast primitive setters void Set(bool value); void Set(double i); void Set(int32_t i); void Set(uint32_t i); // Fast JS primitive setters void SetNull(); void SetUndefined(); void SetEmptyString(); // Convenience getter for isolate v8::Isolate *GetIsolate() const; }; ``` See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/node-8.16/da/da7/classv8_1_1_return_value.html) for further information on this. ### Method declaration JavaScript-accessible methods should be declared with the following signature to form a `Nan::FunctionCallback`: ```c++ typedef void(*FunctionCallback)(const FunctionCallbackInfo&); ``` Example: ```c++ void MethodName(const Nan::FunctionCallbackInfo& info) { ... } ``` You do not need to declare a new `HandleScope` within a method as one is implicitly created for you. **Example usage** ```c++ // .h: class Foo : public Nan::ObjectWrap { ... static void Bar(const Nan::FunctionCallbackInfo& info); static void Baz(const Nan::FunctionCallbackInfo& info); } // .cc: void Foo::Bar(const Nan::FunctionCallbackInfo& info) { ... } void Foo::Baz(const Nan::FunctionCallbackInfo& info) { ... } ``` A helper macro `NAN_METHOD(methodname)` exists, compatible with NAN v1 method declarations. **Example usage with `NAN_METHOD(methodname)`** ```c++ // .h: class Foo : public Nan::ObjectWrap { ... static NAN_METHOD(Bar); static NAN_METHOD(Baz); } // .cc: NAN_METHOD(Foo::Bar) { ... } NAN_METHOD(Foo::Baz) { ... } ``` Use [`Nan::SetPrototypeMethod`](#api_nan_set_prototype_method) to attach a method to a JavaScript function prototype or [`Nan::SetMethod`](#api_nan_set_method) to attach a method directly on a JavaScript object. ### Getter declaration JavaScript-accessible getters should be declared with the following signature to form a `Nan::GetterCallback`: ```c++ typedef void(*GetterCallback)(v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void GetterName(v8::Local property, const Nan::PropertyCallbackInfo& info) { ... } ``` You do not need to declare a new `HandleScope` within a getter as one is implicitly created for you. A helper macro `NAN_GETTER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors). ### Setter declaration JavaScript-accessible setters should be declared with the following signature to form a Nan::SetterCallback: ```c++ typedef void(*SetterCallback)(v8::Local, v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void SetterName(v8::Local property, v8::Local value, const Nan::PropertyCallbackInfo& info) { ... } ``` You do not need to declare a new `HandleScope` within a setter as one is implicitly created for you. A helper macro `NAN_SETTER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors). ### Property getter declaration JavaScript-accessible property getters should be declared with the following signature to form a Nan::PropertyGetterCallback: ```c++ typedef void(*PropertyGetterCallback)(v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void PropertyGetterName(v8::Local property, const Nan::PropertyCallbackInfo& info) { ... } ``` You do not need to declare a new `HandleScope` within a property getter as one is implicitly created for you. A helper macro `NAN_PROPERTY_GETTER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Property setter declaration JavaScript-accessible property setters should be declared with the following signature to form a Nan::PropertySetterCallback: ```c++ typedef void(*PropertySetterCallback)(v8::Local, v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void PropertySetterName(v8::Local property, v8::Local value, const Nan::PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a property setter as one is implicitly created for you. A helper macro `NAN_PROPERTY_SETTER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Property enumerator declaration JavaScript-accessible property enumerators should be declared with the following signature to form a Nan::PropertyEnumeratorCallback: ```c++ typedef void(*PropertyEnumeratorCallback)(const PropertyCallbackInfo&); ``` Example: ```c++ void PropertyEnumeratorName(const Nan::PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a property enumerator as one is implicitly created for you. A helper macro `NAN_PROPERTY_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Property deleter declaration JavaScript-accessible property deleters should be declared with the following signature to form a Nan::PropertyDeleterCallback: ```c++ typedef void(*PropertyDeleterCallback)(v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void PropertyDeleterName(v8::Local property, const Nan::PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a property deleter as one is implicitly created for you. A helper macro `NAN_PROPERTY_DELETER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Property query declaration JavaScript-accessible property query methods should be declared with the following signature to form a Nan::PropertyQueryCallback: ```c++ typedef void(*PropertyQueryCallback)(v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void PropertyQueryName(v8::Local property, const Nan::PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a property query method as one is implicitly created for you. A helper macro `NAN_PROPERTY_QUERY(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Index getter declaration JavaScript-accessible index getter methods should be declared with the following signature to form a Nan::IndexGetterCallback: ```c++ typedef void(*IndexGetterCallback)(uint32_t, const PropertyCallbackInfo&); ``` Example: ```c++ void IndexGetterName(uint32_t index, const PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a index getter as one is implicitly created for you. A helper macro `NAN_INDEX_GETTER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Index setter declaration JavaScript-accessible index setter methods should be declared with the following signature to form a Nan::IndexSetterCallback: ```c++ typedef void(*IndexSetterCallback)(uint32_t, v8::Local, const PropertyCallbackInfo&); ``` Example: ```c++ void IndexSetterName(uint32_t index, v8::Local value, const PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a index setter as one is implicitly created for you. A helper macro `NAN_INDEX_SETTER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Index enumerator declaration JavaScript-accessible index enumerator methods should be declared with the following signature to form a Nan::IndexEnumeratorCallback: ```c++ typedef void(*IndexEnumeratorCallback)(const PropertyCallbackInfo&); ``` Example: ```c++ void IndexEnumeratorName(const PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a index enumerator as one is implicitly created for you. A helper macro `NAN_INDEX_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Index deleter declaration JavaScript-accessible index deleter methods should be declared with the following signature to form a Nan::IndexDeleterCallback: ```c++ typedef void(*IndexDeleterCallback)(uint32_t, const PropertyCallbackInfo&); ``` Example: ```c++ void IndexDeleterName(uint32_t index, const PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a index deleter as one is implicitly created for you. A helper macro `NAN_INDEX_DELETER(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Index query declaration JavaScript-accessible index query methods should be declared with the following signature to form a Nan::IndexQueryCallback: ```c++ typedef void(*IndexQueryCallback)(uint32_t, const PropertyCallbackInfo&); ``` Example: ```c++ void IndexQueryName(uint32_t index, const PropertyCallbackInfo& info); ``` You do not need to declare a new `HandleScope` within a index query method as one is implicitly created for you. A helper macro `NAN_INDEX_QUERY(methodname)` exists, compatible with NAN v1 method declarations. Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). ### Nan::SetMethod() Sets a method with a given name directly on a JavaScript object where the method has the `Nan::FunctionCallback` signature (see Method declaration). Signature: ```c++ void Nan::SetMethod(v8::Local recv, const char *name, Nan::FunctionCallback callback, v8::Local data = v8::Local()) void Nan::SetMethod(v8::Local templ, const char *name, Nan::FunctionCallback callback, v8::Local data = v8::Local()) ``` ### Nan::SetPrototypeMethod() Sets a method with a given name on a `FunctionTemplate`'s prototype where the method has the `Nan::FunctionCallback` signature (see Method declaration). Signature: ```c++ void Nan::SetPrototypeMethod(v8::Local recv, const char* name, Nan::FunctionCallback callback, v8::Local data = v8::Local()) ``` ### Nan::SetAccessor() Sets getters and setters for a property with a given name on an `ObjectTemplate` or a plain `Object`. Accepts getters with the `Nan::GetterCallback` signature (see Getter declaration) and setters with the `Nan::SetterCallback` signature (see Setter declaration). Signature: ```c++ void SetAccessor(v8::Local tpl, v8::Local name, Nan::GetterCallback getter, Nan::SetterCallback setter = 0, v8::Local data = v8::Local(), v8::AccessControl settings = v8::DEFAULT, v8::PropertyAttribute attribute = v8::None, imp::Sig signature = imp::Sig()); bool SetAccessor(v8::Local obj, v8::Local name, Nan::GetterCallback getter, Nan::SetterCallback setter = 0, v8::Local data = v8::Local(), v8::AccessControl settings = v8::DEFAULT, v8::PropertyAttribute attribute = v8::None) ``` See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#aca0ed196f8a9adb1f68b1aadb6c9cd77) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ae91b3b56b357f285288c89fbddc46d1b) for further information about how to use `Nan::SetAccessor()`. ### Nan::SetNamedPropertyHandler() Sets named property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts: * Property getters with the `Nan::PropertyGetterCallback` signature (see Property getter declaration) * Property setters with the `Nan::PropertySetterCallback` signature (see Property setter declaration) * Property query methods with the `Nan::PropertyQueryCallback` signature (see Property query declaration) * Property deleters with the `Nan::PropertyDeleterCallback` signature (see Property deleter declaration) * Property enumerators with the `Nan::PropertyEnumeratorCallback` signature (see Property enumerator declaration) Signature: ```c++ void SetNamedPropertyHandler(v8::Local tpl, Nan::PropertyGetterCallback getter, Nan::PropertySetterCallback setter = 0, Nan::PropertyQueryCallback query = 0, Nan::PropertyDeleterCallback deleter = 0, Nan::PropertyEnumeratorCallback enumerator = 0, v8::Local data = v8::Local()) ``` See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#a33b3ebd7de641f6cc6414b7de01fc1c7) for further information about how to use `Nan::SetNamedPropertyHandler()`. ### Nan::SetIndexedPropertyHandler() Sets indexed property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts: * Indexed property getters with the `Nan::IndexGetterCallback` signature (see Index getter declaration) * Indexed property setters with the `Nan::IndexSetterCallback` signature (see Index setter declaration) * Indexed property query methods with the `Nan::IndexQueryCallback` signature (see Index query declaration) * Indexed property deleters with the `Nan::IndexDeleterCallback` signature (see Index deleter declaration) * Indexed property enumerators with the `Nan::IndexEnumeratorCallback` signature (see Index enumerator declaration) Signature: ```c++ void SetIndexedPropertyHandler(v8::Local tpl, Nan::IndexGetterCallback getter, Nan::IndexSetterCallback setter = 0, Nan::IndexQueryCallback query = 0, Nan::IndexDeleterCallback deleter = 0, Nan::IndexEnumeratorCallback enumerator = 0, v8::Local data = v8::Local()) ``` See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#ac89f06d634add0e890452033f7d17ff1) for further information about how to use `Nan::SetIndexedPropertyHandler()`. ### Nan::SetTemplate() Adds properties on an `Object`'s or `Function`'s template. Signature: ```c++ void Nan::SetTemplate(v8::Local templ, const char *name, v8::Local value); void Nan::SetTemplate(v8::Local templ, v8::Local name, v8::Local value, v8::PropertyAttribute attributes) ``` Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#ae3fbaff137557aa6a0233bc7e52214ac). ### Nan::SetPrototypeTemplate() Adds properties on an `Object`'s or `Function`'s prototype template. Signature: ```c++ void Nan::SetPrototypeTemplate(v8::Local templ, const char *name, v8::Local value); void Nan::SetPrototypeTemplate(v8::Local templ, v8::Local name, v8::Local value, v8::PropertyAttribute attributes) ``` Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). ### Nan::SetInstanceTemplate() Use to add instance properties on `FunctionTemplate`'s. Signature: ```c++ void Nan::SetInstanceTemplate(v8::Local templ, const char *name, v8::Local value); void Nan::SetInstanceTemplate(v8::Local templ, v8::Local name, v8::Local value, v8::PropertyAttribute attributes) ``` Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/node-8.16/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). ### Nan::SetCallHandler() Set the call-handler callback for a `v8::FunctionTemplate`. This callback is called whenever the function created from this FunctionTemplate is called. Signature: ```c++ void Nan::SetCallHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) ``` Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/node-8.16/d8/d83/classv8_1_1_function_template.html#ab7574b298db3c27fbc2ed465c08ea2f8). ### Nan::SetCallAsFunctionHandler() Sets the callback to be used when calling instances created from the `v8::ObjectTemplate` as a function. If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function. Signature: ```c++ void Nan::SetCallAsFunctionHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) ``` Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#a5e9612fc80bf6db8f2da199b9b0bd04e).