{
  "source": "doc/api/globals.md",
  "globals": [
    {
      "textRaw": "Class: Buffer",
      "type": "global",
      "name": "Buffer",
      "meta": {
        "added": [
          "v0.1.103"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "type": "var",
      "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The name of the directory that the currently executing script resides in.</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\n</code></pre>\n<p><code>__dirname</code> isn&#39;t actually a global but rather local to each module.</p>\n<p>For instance, 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>__dirname</code> within <code>b.js</code> will return\n<code>/Users/mjr/app/node_modules/b</code> while references to <code>__dirname</code> within <code>a.js</code>\nwill return <code>/Users/mjr/app</code>.</p>\n"
    },
    {
      "textRaw": "\\_\\_filename",
      "name": "\\_\\_filename",
      "meta": {
        "added": [
          "v0.0.1"
        ]
      },
      "type": "var",
      "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The filename of the code being executed.  This is the resolved absolute path\nof this code file.  For a main program this is not necessarily the same\nfilename used in the command line.  The value inside a module is the path\nto that module file.</p>\n<p>Example: 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\n</code></pre>\n<p><code>__filename</code> isn&#39;t actually a global but rather local to each module.</p>\n"
    },
    {
      "textRaw": "exports",
      "name": "exports",
      "meta": {
        "added": [
          "v0.1.12"
        ]
      },
      "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> isn&#39;t 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"
        ]
      },
      "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> isn&#39;t 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"
        ]
      },
      "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> isn&#39;t actually a\nglobal but rather local to each module.</p>\n",
      "properties": [
        {
          "textRaw": "`cache` {Object} ",
          "type": "Object",
          "name": "cache",
          "meta": {
            "added": [
              "v0.3.0"
            ]
          },
          "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"
            ]
          },
          "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"
        }
      ],
      "methods": [
        {
          "textRaw": "require.resolve()",
          "type": "method",
          "name": "resolve",
          "meta": {
            "added": [
              "v0.3.0"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "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"
            ]
          },
          "type": "var",
          "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The name of the directory that the currently executing script resides in.</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\n</code></pre>\n<p><code>__dirname</code> isn&#39;t actually a global but rather local to each module.</p>\n<p>For instance, 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>__dirname</code> within <code>b.js</code> will return\n<code>/Users/mjr/app/node_modules/b</code> while references to <code>__dirname</code> within <code>a.js</code>\nwill return <code>/Users/mjr/app</code>.</p>\n"
        },
        {
          "textRaw": "\\_\\_filename",
          "name": "\\_\\_filename",
          "meta": {
            "added": [
              "v0.0.1"
            ]
          },
          "type": "var",
          "desc": "<ul>\n<li>{String}</li>\n</ul>\n<p>The filename of the code being executed.  This is the resolved absolute path\nof this code file.  For a main program this is not necessarily the same\nfilename used in the command line.  The value inside a module is the path\nto that module file.</p>\n<p>Example: 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\n</code></pre>\n<p><code>__filename</code> isn&#39;t actually a global but rather local to each module.</p>\n"
        },
        {
          "textRaw": "exports",
          "name": "exports",
          "meta": {
            "added": [
              "v0.1.12"
            ]
          },
          "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> isn&#39;t 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"
            ]
          },
          "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> isn&#39;t 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"
            ]
          },
          "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> isn&#39;t actually a\nglobal but rather local to each module.</p>\n",
          "properties": [
            {
              "textRaw": "`cache` {Object} ",
              "type": "Object",
              "name": "cache",
              "meta": {
                "added": [
                  "v0.3.0"
                ]
              },
              "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"
                ]
              },
              "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"
            }
          ],
          "methods": [
            {
              "textRaw": "require.resolve()",
              "type": "method",
              "name": "resolve",
              "meta": {
                "added": [
                  "v0.3.0"
                ]
              },
              "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": []
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
