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

unify 1-getting-started/6_object_wrap samples to implements the same logics. #539

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

UrielCh
Copy link

@UrielCh UrielCh commented Sep 10, 2024

The 3 example in 1-getting-started/6_object_wrap do not implement the same addon.

  • Nan implement value() as a function
  • Napi implement value as a field
  • node-addon-api implement value() as a function

this PR implement value as a Read and Write field and add a getValue() as a function.

the 2 accessor (set and set) and the getter are now called in the addon.js.

the 3 addon.js files are now the same.

note:
the NaN::InstanceAccessor wasn't use in any example before this PR.

@UrielCh UrielCh changed the title unify 1-getting-started/6_object_wrap samples unify 1-getting-started/6_object_wrap samples to implements the same logics. Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Need Triage
Development

Successfully merging this pull request may close these issues.

1 participant