diff options
author | elioat <hi@eli.li> | 2023-06-19 12:27:59 -0400 |
---|---|---|
committer | elioat <hi@eli.li> | 2023-06-19 12:27:59 -0400 |
commit | 1cbdbcff09387f1185e40fa48fd3801e54e5ba86 (patch) | |
tree | d8ab8872a81c0656c62334fb43f4bc07db8aa807 /js/blotbotboot/node_modules/nan/doc/converters.md | |
parent | 00761c368216e401eb5b17a677ae51db643d818b (diff) | |
download | tour-1cbdbcff09387f1185e40fa48fd3801e54e5ba86.tar.gz |
Removed node_modules folder because I am an idiot
Diffstat (limited to 'js/blotbotboot/node_modules/nan/doc/converters.md')
-rw-r--r-- | js/blotbotboot/node_modules/nan/doc/converters.md | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/js/blotbotboot/node_modules/nan/doc/converters.md b/js/blotbotboot/node_modules/nan/doc/converters.md deleted file mode 100644 index d20861b..0000000 --- a/js/blotbotboot/node_modules/nan/doc/converters.md +++ /dev/null @@ -1,41 +0,0 @@ -## Converters - -NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN. - - - <a href="#api_nan_to"><b><code>Nan::To()</code></b></a> - -<a name="api_nan_to"></a> -### Nan::To() - -Converts a `v8::Local<v8::Value>` to a different subtype of `v8::Value` or to a native data type. Returns a `Nan::MaybeLocal<>` or a `Nan::Maybe<>` accordingly. - -See [maybe_types.md](./maybe_types.md) for more information on `Nan::Maybe` types. - -Signatures: - -```c++ -// V8 types -Nan::MaybeLocal<v8::Boolean> Nan::To<v8::Boolean>(v8::Local<v8::Value> val); -Nan::MaybeLocal<v8::Int32> Nan::To<v8::Int32>(v8::Local<v8::Value> val); -Nan::MaybeLocal<v8::Integer> Nan::To<v8::Integer>(v8::Local<v8::Value> val); -Nan::MaybeLocal<v8::Object> Nan::To<v8::Object>(v8::Local<v8::Value> val); -Nan::MaybeLocal<v8::Number> Nan::To<v8::Number>(v8::Local<v8::Value> val); -Nan::MaybeLocal<v8::String> Nan::To<v8::String>(v8::Local<v8::Value> val); -Nan::MaybeLocal<v8::Uint32> Nan::To<v8::Uint32>(v8::Local<v8::Value> val); - -// Native types -Nan::Maybe<bool> Nan::To<bool>(v8::Local<v8::Value> val); -Nan::Maybe<double> Nan::To<double>(v8::Local<v8::Value> val); -Nan::Maybe<int32_t> Nan::To<int32_t>(v8::Local<v8::Value> val); -Nan::Maybe<int64_t> Nan::To<int64_t>(v8::Local<v8::Value> val); -Nan::Maybe<uint32_t> Nan::To<uint32_t>(v8::Local<v8::Value> val); -``` - -### Example - -```c++ -v8::Local<v8::Value> val; -Nan::MaybeLocal<v8::String> str = Nan::To<v8::String>(val); -Nan::Maybe<double> d = Nan::To<double>(val); -``` - |