📝 Edit markdown

This commit is contained in:
raub 2018-05-24 11:03:47 +03:00
parent ccdb5a301f
commit db1b6cad42
1 changed files with 14 additions and 14 deletions

View File

@ -344,17 +344,17 @@ There is a C++ header file, `addon-tools.hpp`, shipped with this package. It
introduces several useful macros and utilities. Also it includes Nan automatically,
so that you can replace:
```
// #include <v8.h> // already in node.h
// #include <node.h> // already in nan.h
#include <nan.h>
```
```
// #include <v8.h> // already in node.h
// #include <node.h> // already in nan.h
#include <nan.h>
```
with
with
```
#include <addon-tools.hpp> // or event-emitter.hpp
```
```
#include <addon-tools.hpp> // or event-emitter.hpp
```
In gyp, the include directory should be set for your addon to know where to get it.
As it was mentioned above, this can be done automatically. Also an actual path to the
@ -467,7 +467,7 @@ starting from `0`.
* `CHECK_LET_ARG(I, C, T)` - check if argument `I` is approved by `C` check or empty.
* `CTOR_CHECK(T)` - check if method is called as a constructor
* `SETTER_CHECK(C, T)` - check if setter `value` is approved by `C` check.
* `DES_CHECK` - within dynamic method check if the instance wasn't destroyed by `_destroy()`.
* `DES_CHECK` - within dynamic method check if the instance wasn't destroyed by `destroy()`.
</details>
@ -719,7 +719,7 @@ emits an event with the given `name` and, optionally, some additional arguments
subscribes `cb` to receive `name` events from this emitter, basically
`emitter.on(name, cb)`.
* `virtual void _destroy()` - destroys the object, i.e. deactivates it and frees
* `void destroy()` - destroys the object, i.e. deactivates it and frees
resources. This is what also called inside
`~EventEmitter()`, but only the first call is effective anyway.