nodejs / nodejs/nan

Nan::SetProperty (const char * version of Nan::Set to match Nan::SetMethod)

Open
#947 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.4k
Forks
531
Avg merge
21m
Merged PRs (30d)
1

Description

Perhaps I missed it, but there does not appear to be a convenience method that lets you just pass a C string for the property name to Nan::Set like you can do with Nan::SetMethod. Perhaps there is a reason for this, but I always end up making a macro that does this for myself and figured it was worth asking if it would be fine to add officially here, either as an overloaded version of Nan::Set or as a new Nan::SetProperty method. If so I can make a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Nan::Set and Nan::SetMethod APIs to compare their property-name handling. Determine whether the requested C-string convenience form should be an overload or Nan::SetProperty, and consider the change complete when the chosen public API is implemented consistently with the existing method.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, nodejs
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.