{
  "source": "doc/api/globals.md",
  "globals": [
    {
      "textRaw": "Class: Buffer",
      "type": "global",
      "name": "Buffer",
      "meta": {
        "added": [
          "v0.1.103"
        ],
        "changes": []
      },
      "desc": "<ul>\n<li>{Function}</li>\n</ul>\n<p>Used to handle binary data. See the <a href=\"buffer.html\">buffer section</a>.</p>\n"
    },
    {
      "textRaw": "clearImmediate(immediateObject)",
      "type": "global",
      "name": "clearImmediate",
      "meta": {
        "added": [
          "v0.9.1"
        ],
        "changes": []
      },
      "desc": "<p><a href=\"timers.html#timers_clearimmediate_immediate\"><code>clearImmediate</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
    },
    {
      "textRaw": "clearInterval(intervalObject)",
      "type": "global",
      "name": "clearInterval",
      "meta": {
        "added": [
          "v0.0.1"
        ],
        "changes": []
      },
      "desc": "<p><a href=\"timers.html#timers_clearinterval_timeout\"><code>clearInterval</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
    },
    {
      "textRaw": "clearTimeout(timeoutObject)",
      "type": "global",
      "name": "clearTimeout",
      "meta": {
        "added": [
          "v0.0.1"
        ],
        "changes": []
      },
      "desc": "<p><a href=\"timers.html#timers_cleartimeout_timeout\"><code>clearTimeout</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
    },
    {
      "textRaw": "console",
      "name": "console",
      "meta": {
        "added": [
          "v0.1.100"
        ],
        "changes": []
      },
      "type": "global",
      "desc": "<ul>\n<li>{Object}</li>\n</ul>\n<p>Used to print to stdout and stderr. See the <a href=\"console.html\"><code>console</code></a> section.</p>\n"
    },
    {
      "textRaw": "global",
      "name": "global",
      "meta": {
        "added": [
          "v0.1.27"
        ],
        "changes": []
      },
      "type": "global",
      "desc": "<ul>\n<li>{Object} The global namespace object.</li>\n</ul>\n<p>In browsers, the top-level scope is the global scope. That means that in\nbrowsers if you&#39;re in the global scope <code>var something</code> will define a global\nvariable. In Node.js this is different. The top-level scope is not the global\nscope; <code>var something</code> inside an Node.js module will be local to that module.</p>\n"
    },
    {
      "textRaw": "process",
      "name": "process",
      "meta": {
        "added": [
          "v0.1.7"
        ],
        "changes": []
      },
      "type": "global",
      "desc": "<ul>\n<li>{Object}</li>\n</ul>\n<p>The process object. See the <a href=\"process.html#process_process\"><code>process</code> object</a> section.</p>\n"
    },
    {
      "textRaw": "setImmediate(callback[, ...args])",
      "type": "global",
      "name": "setImmediate",
      "meta": {
        "added": [
          "v0.9.1"
        ],
        "changes": []
      },
      "desc": "<p><a href=\"timers.html#timers_setimmediate_callback_args\"><code>setImmediate</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
    },
    {
      "textRaw": "setInterval(callback, delay[, ...args])",
      "type": "global",
      "name": "setInterval",
      "meta": {
        "added": [
          "v0.0.1"
        ],
        "changes": []
      },
      "desc": "<p><a href=\"timers.html#timers_setinterval_callback_delay_args\"><code>setInterval</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
    },
    {
      "textRaw": "setTimeout(callback, delay[, ...args])",
      "type": "global",
      "name": "setTimeout",
      "meta": {
        "added": [
          "v0.0.1"
        ],
        "changes": []
      },
      "desc": "<p><a href=\"timers.html#timers_settimeout_callback_delay_args\"><code>setTimeout</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
    }
  ],
  "vars": [
    {
      "textRaw": "\\_\\_dirname",
      "name": "\\_\\_dirname",
      "meta": {
        "added": [
          "v0.1.27"
        ],
        "changes": []
      },
      "type": "var",
      "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The directory name of the current module. This the same as the\n<a href=\"path.html#path_path_dirname_path\"><code>path.dirname()</code></a> of the <a href=\"#globals_filename\"><code>__filename</code></a>.</p>\n<p><code>__dirname</code> is not actually a global but rather local to each module.</p>\n<p>Example: running <code>node example.js</code> from <code>/Users/mjr</code></p>\n<pre><code class=\"lang-js\">console.log(__dirname);\n// Prints: /Users/mjr\nconsole.log(path.dirname(__filename));\n// Prints: /Users/mjr\n</code></pre>\n"
    },
    {
      "textRaw": "\\_\\_filename",
      "name": "\\_\\_filename",
      "meta": {
        "added": [
          "v0.0.1"
        ],
        "changes": []
      },
      "type": "var",
      "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The file name of the current module. This is the resolved absolute path of the\ncurrent module file.</p>\n<p>For a main program this is not necessarily the same as the file name used in the\ncommand line.</p>\n<p>See <a href=\"#globals_dirname\"><code>__dirname</code></a> for the directory name of the current module.</p>\n<p><code>__filename</code> is not actually a global but rather local to each module.</p>\n<p>Examples:</p>\n<p>Running <code>node example.js</code> from <code>/Users/mjr</code></p>\n<pre><code class=\"lang-js\">console.log(__filename);\n// Prints: /Users/mjr/example.js\nconsole.log(__dirname);\n// Prints: /Users/mjr\n</code></pre>\n<p>Given two modules: <code>a</code> and <code>b</code>, where <code>b</code> is a dependency of\n<code>a</code> and there is a directory structure of:</p>\n<ul>\n<li><code>/Users/mjr/app/a.js</code></li>\n<li><code>/Users/mjr/app/node_modules/b/b.js</code></li>\n</ul>\n<p>References to <code>__filename</code> within <code>b.js</code> will return\n<code>/Users/mjr/app/node_modules/b/b.js</code> while references to <code>__filename</code> within\n<code>a.js</code> will return <code>/Users/mjr/app/a.js</code>.</p>\n"
    },
    {
      "textRaw": "exports",
      "name": "exports",
      "meta": {
        "added": [
          "v0.1.12"
        ],
        "changes": []
      },
      "type": "var",
      "desc": "<p>A reference to the <code>module.exports</code> that is shorter to type.\nSee <a href=\"modules.html\">module system documentation</a> for details on when to use <code>exports</code> and\nwhen to use <code>module.exports</code>.</p>\n<p><code>exports</code> is not actually a global but rather local to each module.</p>\n<p>See the <a href=\"modules.html\">module system documentation</a> for more information.</p>\n"
    },
    {
      "textRaw": "module",
      "name": "module",
      "meta": {
        "added": [
          "v0.1.16"
        ],
        "changes": []
      },
      "type": "var",
      "desc": "<ul>\n<li>{Object}</li>\n</ul>\n<p>A reference to the current module. In particular\n<code>module.exports</code> is used for defining what a module exports and makes\navailable through <code>require()</code>.</p>\n<p><code>module</code> is not actually a global but rather local to each module.</p>\n<p>See the <a href=\"modules.html\">module system documentation</a> for more information.</p>\n"
    },
    {
      "textRaw": "require()",
      "type": "var",
      "name": "require",
      "meta": {
        "added": [
          "v0.1.13"
        ],
        "changes": []
      },
      "desc": "<ul>\n<li>{Function}</li>\n</ul>\n<p>To require modules. See the <a href=\"modules.html#modules_modules\">Modules</a> section.  <code>require</code> is not actually a\nglobal but rather local to each module.</p>\n",
      "properties": [
        {
          "textRaw": "`cache` {Object} ",
          "type": "Object",
          "name": "cache",
          "meta": {
            "added": [
              "v0.3.0"
            ],
            "changes": []
          },
          "desc": "<p>Modules are cached in this object when they are required. By deleting a key\nvalue from this object, the next <code>require</code> will reload the module. Note that\nthis does not apply to <a href=\"addons.html\">native addons</a>, for which reloading will result in an\nError.</p>\n"
        },
        {
          "textRaw": "`extensions` {Object} ",
          "type": "Object",
          "name": "extensions",
          "meta": {
            "added": [
              "v0.3.0"
            ],
            "deprecated": [
              "v0.10.6"
            ],
            "changes": []
          },
          "stability": 0,
          "stabilityText": "Deprecated",
          "desc": "<p>Instruct <code>require</code> on how to handle certain file extensions.</p>\n<p>Process files with the extension <code>.sjs</code> as <code>.js</code>:</p>\n<pre><code class=\"lang-js\">require.extensions[&#39;.sjs&#39;] = require.extensions[&#39;.js&#39;];\n</code></pre>\n<p><strong>Deprecated</strong>  In the past, this list has been used to load\nnon-JavaScript modules into Node.js by compiling them on-demand.\nHowever, in practice, there are much better ways to do this, such as\nloading modules via some other Node.js program, or compiling them to\nJavaScript ahead of time.</p>\n<p>Since the module system is locked, this feature will probably never go\naway.  However, it may have subtle bugs and complexities that are best\nleft untouched.</p>\n<p>Note that the number of file system operations that the module system\nhas to perform in order to resolve a <code>require(...)</code> statement to a\nfilename scales linearly with the number of registered extensions.</p>\n<p>In other words, adding extensions slows down the module loader and\nshould be discouraged.</p>\n"
        }
      ],
      "methods": [
        {
          "textRaw": "require.resolve()",
          "type": "method",
          "name": "resolve",
          "meta": {
            "added": [
              "v0.3.0"
            ],
            "changes": []
          },
          "desc": "<p>Use the internal <code>require()</code> machinery to look up the location of a module,\nbut rather than loading the module, just return the resolved filename.</p>\n",
          "signatures": [
            {
              "params": []
            }
          ]
        }
      ]
    }
  ],
  "miscs": [
    {
      "textRaw": "Global Objects",
      "name": "Global Objects",
      "type": "misc",
      "desc": "<p>These objects are available in all modules. Some of these objects aren&#39;t\nactually in the global scope but in the module scope - this will be noted.</p>\n<p>The objects listed here are specific to Node.js. There are a number of\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects\">built-in objects</a> that are part of the JavaScript language itself, which are\nalso globally accessible.</p>\n",
      "globals": [
        {
          "textRaw": "Class: Buffer",
          "type": "global",
          "name": "Buffer",
          "meta": {
            "added": [
              "v0.1.103"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li>{Function}</li>\n</ul>\n<p>Used to handle binary data. See the <a href=\"buffer.html\">buffer section</a>.</p>\n"
        },
        {
          "textRaw": "clearImmediate(immediateObject)",
          "type": "global",
          "name": "clearImmediate",
          "meta": {
            "added": [
              "v0.9.1"
            ],
            "changes": []
          },
          "desc": "<p><a href=\"timers.html#timers_clearimmediate_immediate\"><code>clearImmediate</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
        },
        {
          "textRaw": "clearInterval(intervalObject)",
          "type": "global",
          "name": "clearInterval",
          "meta": {
            "added": [
              "v0.0.1"
            ],
            "changes": []
          },
          "desc": "<p><a href=\"timers.html#timers_clearinterval_timeout\"><code>clearInterval</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
        },
        {
          "textRaw": "clearTimeout(timeoutObject)",
          "type": "global",
          "name": "clearTimeout",
          "meta": {
            "added": [
              "v0.0.1"
            ],
            "changes": []
          },
          "desc": "<p><a href=\"timers.html#timers_cleartimeout_timeout\"><code>clearTimeout</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
        },
        {
          "textRaw": "console",
          "name": "console",
          "meta": {
            "added": [
              "v0.1.100"
            ],
            "changes": []
          },
          "type": "global",
          "desc": "<ul>\n<li>{Object}</li>\n</ul>\n<p>Used to print to stdout and stderr. See the <a href=\"console.html\"><code>console</code></a> section.</p>\n"
        },
        {
          "textRaw": "global",
          "name": "global",
          "meta": {
            "added": [
              "v0.1.27"
            ],
            "changes": []
          },
          "type": "global",
          "desc": "<ul>\n<li>{Object} The global namespace object.</li>\n</ul>\n<p>In browsers, the top-level scope is the global scope. That means that in\nbrowsers if you&#39;re in the global scope <code>var something</code> will define a global\nvariable. In Node.js this is different. The top-level scope is not the global\nscope; <code>var something</code> inside an Node.js module will be local to that module.</p>\n"
        },
        {
          "textRaw": "process",
          "name": "process",
          "meta": {
            "added": [
              "v0.1.7"
            ],
            "changes": []
          },
          "type": "global",
          "desc": "<ul>\n<li>{Object}</li>\n</ul>\n<p>The process object. See the <a href=\"process.html#process_process\"><code>process</code> object</a> section.</p>\n"
        },
        {
          "textRaw": "setImmediate(callback[, ...args])",
          "type": "global",
          "name": "setImmediate",
          "meta": {
            "added": [
              "v0.9.1"
            ],
            "changes": []
          },
          "desc": "<p><a href=\"timers.html#timers_setimmediate_callback_args\"><code>setImmediate</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
        },
        {
          "textRaw": "setInterval(callback, delay[, ...args])",
          "type": "global",
          "name": "setInterval",
          "meta": {
            "added": [
              "v0.0.1"
            ],
            "changes": []
          },
          "desc": "<p><a href=\"timers.html#timers_setinterval_callback_delay_args\"><code>setInterval</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
        },
        {
          "textRaw": "setTimeout(callback, delay[, ...args])",
          "type": "global",
          "name": "setTimeout",
          "meta": {
            "added": [
              "v0.0.1"
            ],
            "changes": []
          },
          "desc": "<p><a href=\"timers.html#timers_settimeout_callback_delay_args\"><code>setTimeout</code></a> is described in the <a href=\"timers.html\">timers</a> section.</p>\n"
        }
      ],
      "vars": [
        {
          "textRaw": "\\_\\_dirname",
          "name": "\\_\\_dirname",
          "meta": {
            "added": [
              "v0.1.27"
            ],
            "changes": []
          },
          "type": "var",
          "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The directory name of the current module. This the same as the\n<a href=\"path.html#path_path_dirname_path\"><code>path.dirname()</code></a> of the <a href=\"#globals_filename\"><code>__filename</code></a>.</p>\n<p><code>__dirname</code> is not actually a global but rather local to each module.</p>\n<p>Example: running <code>node example.js</code> from <code>/Users/mjr</code></p>\n<pre><code class=\"lang-js\">console.log(__dirname);\n// Prints: /Users/mjr\nconsole.log(path.dirname(__filename));\n// Prints: /Users/mjr\n</code></pre>\n"
        },
        {
          "textRaw": "\\_\\_filename",
          "name": "\\_\\_filename",
          "meta": {
            "added": [
              "v0.0.1"
            ],
            "changes": []
          },
          "type": "var",
          "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The file name of the current module. This is the resolved absolute path of the\ncurrent module file.</p>\n<p>For a main program this is not necessarily the same as the file name used in the\ncommand line.</p>\n<p>See <a href=\"#globals_dirname\"><code>__dirname</code></a> for the directory name of the current module.</p>\n<p><code>__filename</code> is not actually a global but rather local to each module.</p>\n<p>Examples:</p>\n<p>Running <code>node example.js</code> from <code>/Users/mjr</code></p>\n<pre><code class=\"lang-js\">console.log(__filename);\n// Prints: /Users/mjr/example.js\nconsole.log(__dirname);\n// Prints: /Users/mjr\n</code></pre>\n<p>Given two modules: <code>a</code> and <code>b</code>, where <code>b</code> is a dependency of\n<code>a</code> and there is a directory structure of:</p>\n<ul>\n<li><code>/Users/mjr/app/a.js</code></li>\n<li><code>/Users/mjr/app/node_modules/b/b.js</code></li>\n</ul>\n<p>References to <code>__filename</code> within <code>b.js</code> will return\n<code>/Users/mjr/app/node_modules/b/b.js</code> while references to <code>__filename</code> within\n<code>a.js</code> will return <code>/Users/mjr/app/a.js</code>.</p>\n"
        },
        {
          "textRaw": "exports",
          "name": "exports",
          "meta": {
            "added": [
              "v0.1.12"
            ],
            "changes": []
          },
          "type": "var",
          "desc": "<p>A reference to the <code>module.exports</code> that is shorter to type.\nSee <a href=\"modules.html\">module system documentation</a> for details on when to use <code>exports</code> and\nwhen to use <code>module.exports</code>.</p>\n<p><code>exports</code> is not actually a global but rather local to each module.</p>\n<p>See the <a href=\"modules.html\">module system documentation</a> for more information.</p>\n"
        },
        {
          "textRaw": "module",
          "name": "module",
          "meta": {
            "added": [
              "v0.1.16"
            ],
            "changes": []
          },
          "type": "var",
          "desc": "<ul>\n<li>{Object}</li>\n</ul>\n<p>A reference to the current module. In particular\n<code>module.exports</code> is used for defining what a module exports and makes\navailable through <code>require()</code>.</p>\n<p><code>module</code> is not actually a global but rather local to each module.</p>\n<p>See the <a href=\"modules.html\">module system documentation</a> for more information.</p>\n"
        },
        {
          "textRaw": "require()",
          "type": "var",
          "name": "require",
          "meta": {
            "added": [
              "v0.1.13"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li>{Function}</li>\n</ul>\n<p>To require modules. See the <a href=\"modules.html#modules_modules\">Modules</a> section.  <code>require</code> is not actually a\nglobal but rather local to each module.</p>\n",
          "properties": [
            {
              "textRaw": "`cache` {Object} ",
              "type": "Object",
              "name": "cache",
              "meta": {
                "added": [
                  "v0.3.0"
                ],
                "changes": []
              },
              "desc": "<p>Modules are cached in this object when they are required. By deleting a key\nvalue from this object, the next <code>require</code> will reload the module. Note that\nthis does not apply to <a href=\"addons.html\">native addons</a>, for which reloading will result in an\nError.</p>\n"
            },
            {
              "textRaw": "`extensions` {Object} ",
              "type": "Object",
              "name": "extensions",
              "meta": {
                "added": [
                  "v0.3.0"
                ],
                "deprecated": [
                  "v0.10.6"
                ],
                "changes": []
              },
              "stability": 0,
              "stabilityText": "Deprecated",
              "desc": "<p>Instruct <code>require</code> on how to handle certain file extensions.</p>\n<p>Process files with the extension <code>.sjs</code> as <code>.js</code>:</p>\n<pre><code class=\"lang-js\">require.extensions[&#39;.sjs&#39;] = require.extensions[&#39;.js&#39;];\n</code></pre>\n<p><strong>Deprecated</strong>  In the past, this list has been used to load\nnon-JavaScript modules into Node.js by compiling them on-demand.\nHowever, in practice, there are much better ways to do this, such as\nloading modules via some other Node.js program, or compiling them to\nJavaScript ahead of time.</p>\n<p>Since the module system is locked, this feature will probably never go\naway.  However, it may have subtle bugs and complexities that are best\nleft untouched.</p>\n<p>Note that the number of file system operations that the module system\nhas to perform in order to resolve a <code>require(...)</code> statement to a\nfilename scales linearly with the number of registered extensions.</p>\n<p>In other words, adding extensions slows down the module loader and\nshould be discouraged.</p>\n"
            }
          ],
          "methods": [
            {
              "textRaw": "require.resolve()",
              "type": "method",
              "name": "resolve",
              "meta": {
                "added": [
                  "v0.3.0"
                ],
                "changes": []
              },
              "desc": "<p>Use the internal <code>require()</code> machinery to look up the location of a module,\nbut rather than loading the module, just return the resolved filename.</p>\n",
              "signatures": [
                {
                  "params": []
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
