LinusU / LinusU/node-append-field
Reconsider using objects with prototype
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Returning objects without prototype make the appended values useless in some contexts. For example, I had to create a function to convert all objects to Object instances because Google Analytics used `hasOwnProperty`. I think what's important in this library is that the enumerable properties of the returned objects are those in the "paths", so object instances are fine for that.
Is there a reason to create objects without prototype other than ease the JSON parsing and the property traversing?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry point. First locate where returned objects are created and how paths are traversed, then compare prototype-less and normal objects against the stated Google Analytics and hasOwnProperty use case. Done requires an agreed behavior and regression coverage for the returned objects' enumerable properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100