gren-lang / gren-lang/core

JSON: Replace `value.hasOwnProperty` with `Object.prototype.hasOwnProperty.call`

Open
#116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
48
Forks
14
Avg merge
4h 14m
Merged PRs (30d)
1

Description

Replace value.hasOwnProperty with Object.prototype.hasOwnProperty.call in the JSON module

https://github.com/gren-lang/core/blob/16aa6c56b983624f443ec9fd45dd8c3bf8faab4d/src/Gren/Kernel/Json.js#L234

This makes it harder for someone to use hasOwnProperty for something other than it's intended purpose.

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

Open src/Gren/Kernel/Json.js at line 234 and inspect the existing hasOwnProperty usage in the JSON module. Replace that call as described in the issue, then verify the JSON module's existing tests or checks pass and that the direct property call is no longer used there.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.