Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "nan", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", | ||
@@ -5,0 +5,0 @@ "main": "include_dirs.js", |
@@ -6,3 +6,3 @@ Native Abstractions for Node.js | ||
***Current version: 1.1.2*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for complete ChangeLog)* | ||
***Current version: 1.2.0*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for complete ChangeLog)* | ||
@@ -260,2 +260,3 @@ [![NPM](https://nodei.co/npm/nan.png?downloads=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/) | ||
* <a href="#api_nan_set_template"><b><code>NanSetTemplate</code></b></a> | ||
* <a href="#api_nan_set_prototype_template"><b><code>NanSetPrototypeTemplate</code></b></a> | ||
* <a href="#api_nan_make_callback"><b><code>NanMakeCallback</code></b></a> | ||
@@ -382,3 +383,3 @@ * <a href="#api_nan_compile_script"><b><code>NanCompileScript</code></b></a> | ||
Use `NAN_WEAK_CALLBACK` to define your V8 WeakReference callbacks. Do not use for declaration. There is an argument object `const _NanWeakCallbackData<T, P> &data` allowing access to the weak object and the supplied parameter through its `GetValue` and `GetParameter` methods. You can even access the weak callback info object through the `GetCallbackInfo()`method, but you probably should not. `Revive()` keeps the weak object alive until the next GC round. | ||
Use `NAN_WEAK_CALLBACK` to define your V8 WeakReference callbacks. There is an argument object `const _NanWeakCallbackData<T, P> &data` allowing access to the weak object and the supplied parameter through its `GetValue` and `GetParameter` methods. You can even access the weak callback info object through the `GetCallbackInfo()`method, but you probably should not. `Revive()` keeps the weak object alive until the next GC round. | ||
@@ -547,3 +548,3 @@ ```c++ | ||
<a name="api_nan_esacpe_scope"></a> | ||
<a name="api_nan_escape_scope"></a> | ||
### Local<T> NanEscapeScope(Handle<T> value); | ||
@@ -662,4 +663,3 @@ Use together with `NanEscapableScope` to escape the scope. Corresponds to `HandleScope::Close` or `EscapableHandleScope::Escape`. | ||
void* decoded = NanRawString(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); | ||
char param_copy[count]; | ||
memcpy(param_copy, decoded, count); | ||
... | ||
delete[] decoded; | ||
@@ -677,2 +677,4 @@ ``` | ||
char* name = NanCString(args[0], &count); | ||
... | ||
delete[] name; | ||
``` | ||
@@ -755,3 +757,3 @@ | ||
<a href="#api_nan_new_context_handle"> | ||
<a name="api_nan_new_context_handle"></a> | ||
### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>]) | ||
@@ -766,3 +768,3 @@ Creates a new `Local<Context>` handle. | ||
<a href="#api_nan_get_current_context"> | ||
<a name="api_nan_get_current_context"></a> | ||
### Local<Context> NanGetCurrentContext() | ||
@@ -805,3 +807,3 @@ | ||
Creates a weak persistent handle with the supplied parameter and `NAN_WEAK_CALLBACK`. The callback has to be fully specialized to work on all versions of Node. | ||
Creates a weak persistent handle with the supplied parameter and `NAN_WEAK_CALLBACK`. | ||
@@ -820,3 +822,3 @@ ```c++ | ||
int *parameter = new int(0); | ||
NanMakeWeakPersistent(func, parameter, &weakCallback<Function, int>); | ||
NanMakeWeakPersistent(func, parameter, &weakCallback); | ||
``` | ||
@@ -829,2 +831,7 @@ | ||
<a name="api_nan_set_prototype_template"></a> | ||
### NanSetPrototypeTemplate(templ, name, value) | ||
Use to add prototype properties on function templates. | ||
<a name="api_nan_make_callback"></a> | ||
@@ -865,3 +872,3 @@ ### NanMakeCallback(target, func, argc, argv) | ||
<a name="api_nan_add_gc_prologue_callback"></a> | ||
<a name="api_nan_remove_gc_prologue_callback"></a> | ||
### NanRemoveGCPrologueCallback(GCPrologueCallback callback) | ||
@@ -868,0 +875,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
980
112036