Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove duplicate section in modules.markdown

  • Loading branch information...
commit 3bea7bfa9df026cdb3721e447dc076778b4fb86b 1 parent efca545
koichik authored
Showing with 0 additions and 15 deletions.
  1. +0 −15 doc/api/modules.markdown
View
15 doc/api/modules.markdown
@@ -307,21 +307,6 @@ Because `module` provides a `filename` property (normally equivalent to
`__filename`), the entry point of the current application can be obtained
by checking `require.main.filename`.
-### Accessing the main module
-
-When a file is run directly from Node, `require.main` is set to its
-`module`. That means that you can determine whether a file has been run
-directly by testing
-
- require.main === module
-
-For a file `foo.js`, this will be `true` if run via `node foo.js`, but
-`false` if run by `require('./foo')`.
-
-Because `module` provides a `filename` property (normally equivalent to
-`__filename`), the entry point of the current application can be obtained
-by checking `require.main.filename`.
-
## Addenda: Package Manager Tips
The semantics of Node's `require()` function were designed to be general
Please sign in to comment.
Something went wrong with that request. Please try again.