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
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions doc/number.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 JavaScript value holding a number.


Returns a non-empty `Napi::Number` object.

Expand All @@ -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`.
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?


Creates a new instance of a `Napi::Number` object.

Expand Down