-
-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Incomplete documentation require() #23106
Copy link
Copy link
Closed
Labels
docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.questionIssues asking questions about Node.js.Issues asking questions about Node.js.
Description
Activity
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.questionIssues asking questions about Node.js.Issues asking questions about Node.js.
Incomplete documentation at https://nodejs.org/dist/latest-v8.x/docs/api/modules.html#modules_require
It states no use cases.
require()is widely used for reading.jsonfiles.Is it safe to apply
require()over.json? Are there any guarantees that.jsonfile is allowed to contain single JSON object only? Are there any guaranteesrequire()ing a.jsonfile containing valid JS code will never lead to interpreting the code?