Skip to content
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

Closed
wants to merge 7 commits into from
Closed

Update number.md #436

wants to merge 7 commits into from

Conversation

heynemann
Copy link
Contributor

The docs are apparently wrong when comparing to the string ones. Hope it is correct. If any other changes are required, please tell me and I'll be more than happy to change.

The docs are apparently wrong when comparing to the string ones. Hope it is correct. If any other changes are required, please tell me and I'll be more than happy to change.
@heynemann
Copy link
Contributor Author

Sorry for the many commits... As github allows you to squash when merging I didn't squash myself. I can if it is preferred, though.

doc/number.md Outdated
- `[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.
Copy link
Contributor

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."?

doc/number.md Outdated
- `[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`.
Copy link
Contributor

Choose a reason for hiding this comment

The 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`".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that the value is a double should be obvious from the prototype.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! Hope it's better now.

doc/number.md Outdated
- `[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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... from which to instantiate the `Napi::Number`", right, because the return value is Napi::Number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the string page it says Napi::Value, but I changed it. Maybe we need to edit the string docs as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heynemann we may indeed need to edit the string docs as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it's OK if we do that in a second PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any additional feedback for this PR?

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mhdawson pushed a commit that referenced this pull request Mar 4, 2019
Update docs to be consistent with how thing are described
in other sections.

PR-URL: #436
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@mhdawson
Copy link
Member

mhdawson commented Mar 4, 2019

@heynemann, thanks for the update landed as: 7b87e0b

@mhdawson mhdawson closed this Mar 4, 2019
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
Update docs to be consistent with how thing are described
in other sections.

PR-URL: nodejs/node-addon-api#436
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
Update docs to be consistent with how thing are described
in other sections.

PR-URL: nodejs/node-addon-api#436
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
Update docs to be consistent with how thing are described
in other sections.

PR-URL: nodejs/node-addon-api#436
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
Update docs to be consistent with how thing are described
in other sections.

PR-URL: nodejs/node-addon-api#436
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants