-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update number.md #436
Update number.md #436
Changes from 5 commits
f8a6a08
5afccb2
77bcf07
0c6720e
2109e18
38f8c07
2632983
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,9 @@ Creates a new instance of a `Napi::Number` object. | |
Napi::Number(napi_env env, napi_value value); | ||
``` | ||
|
||
- `[in] env`: The `napi_env` environment in which to construct the `Napi::Nuber` object. | ||
- `[in] value`: The `napi_value` which is a handle for a JavaScript `Number`. | ||
- `[in] env`: The `napi_env` environment in which to construct the `Napi::Number` object. | ||
- `[in] value`: The primitive to wrap. | ||
|
||
|
||
Returns a non-empty `Napi::Number` object. | ||
|
||
|
@@ -36,8 +37,8 @@ Napi::Number(napi_env env, napi_value value); | |
```cpp | ||
Napi::Number Napi::Number::New(napi_env env, double value); | ||
``` | ||
- `[in] env`: The `napi_env` environment in which to construct the `Napi::Nuber` object. | ||
- `[in] value`: The `napi_value` which is a handle for a JavaScript `Number`. | ||
- `[in] env`: The `napi_env` environment in which to construct the `Napi::Number` object. | ||
- `[in] value`: The C++ primitive from which to instantiate the `Napi::Value`. `value` must be a `c++ double`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO the explanation here should be "The value from which to instantiate the `Napi::Number`". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fact that the value is a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was just keeping in sync with the String one. Ensuring it's similar. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback! Hope it's better now. |
||
|
||
Creates a new instance of a `Napi::Number` object. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this explanation is too brief. How about "The JavaScript value holding a number."?