| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
| ObjectDefineProperty(this, 'exports', { __proto__: null, value }); | ||
| return this.exports; | ||
| }, | ||
| ...(everything && contents[6]), |
There was a problem hiding this comment.
Can we be explicit? Depending on the package.json this can overwrite existing values in this object
Sorry, something went wrong.
There was a problem hiding this comment.
No, we can't be explicit because we don't know what the keys are—that's the point of this feature ;) also, we don't need to worry about overwriting because this is a rest spread.
Sorry, something went wrong.
|
I'm planning to adjust GetPackageJSON to optionally include all fields from the package.json. I think for unrecognised fields, I need to generically handle (parse) each kind of valid json value. Does that functionality already exist in c++, or do I need detect each type and handle the parsing specifically? GetPackageJSON currently has a loop with a bunch of if (key = …), else if (key = …), else if (key = …). If I need to handle each kind of value, I'm thinking to extract those to some kind of hash-map:
Side-note: I haven't worked in c++ in ~20 years, so I can't remember if there is potentially a performance implication here. I'm thinking extracting those avoids re-constructed on each loop (but that may be offset by the cost of function call(s)). |
Sorry, something went wrong.
|
Splitting this into atomic PRs: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This draft is not ready for review. Opening it in its current state for visibility.