{
  "_args": [
    [
      "caller-id@~0.1.0",
      "/Users/johnc/src/fw-host-discovery/node_modules/libnmap"
    ]
  ],
  "_from": "caller-id@>=0.1.0 <0.2.0",
  "_id": "caller-id@0.1.0",
  "_inCache": true,
  "_installable": true,
  "_location": "/caller-id",
  "_npmUser": {
    "email": "pxandbytes@gmail.com",
    "name": "pixelsandbytes"
  },
  "_npmVersion": "1.3.5",
  "_phantomChildren": {},
  "_requested": {
    "name": "caller-id",
    "raw": "caller-id@~0.1.0",
    "rawSpec": "~0.1.0",
    "scope": null,
    "spec": ">=0.1.0 <0.2.0",
    "type": "range"
  },
  "_requiredBy": [
    "/libnmap"
  ],
  "_resolved": "https://registry.npmjs.org/caller-id/-/caller-id-0.1.0.tgz",
  "_shasum": "59bdac0893d12c3871408279231f97458364f07b",
  "_shrinkwrap": null,
  "_spec": "caller-id@~0.1.0",
  "_where": "/Users/johnc/src/fw-host-discovery/node_modules/libnmap",
  "author": {
    "email": "pxandbytes@gmail.com",
    "name": "Pixels & Bytes"
  },
  "bugs": {
    "url": "https://github.com/pixelsandbytes/caller-id/issues"
  },
  "dependencies": {
    "stack-trace": "~0.0.7"
  },
  "description": "A utility for getting information on the caller of a function in node.js",
  "devDependencies": {
    "grunt": "~0.4.1",
    "grunt-cli": "~0.1.9",
    "grunt-contrib-jshint": "~0.7.1",
    "grunt-simple-mocha": "~0.4.0",
    "should": "~2.0.2"
  },
  "directories": {},
  "dist": {
    "shasum": "59bdac0893d12c3871408279231f97458364f07b",
    "tarball": "http://registry.npmjs.org/caller-id/-/caller-id-0.1.0.tgz"
  },
  "engines": {
    "node": ">=0.8"
  },
  "homepage": "https://github.com/pixelsandbytes/caller-id#readme",
  "keywords": [
    "call",
    "caller",
    "caller-id",
    "function",
    "method",
    "stack",
    "stacktrace",
    "trace"
  ],
  "license": "MIT",
  "main": "./lib/caller-id.js",
  "maintainers": [
    {
      "name": "pixelsandbytes",
      "email": "pxandbytes@gmail.com"
    }
  ],
  "name": "caller-id",
  "optionalDependencies": {},
  "readme": "# caller-id\r\n\r\nA utility for getting information on the caller of a function in node.js\r\n\r\n[![Build Status](https://travis-ci.org/pixelsandbytes/caller-id.png?branch=master)](https://travis-ci.org/pixelsandbytes/caller-id)\r\n\r\n## Installation\r\n1. Add `caller-id` as a dependency to your project’s `package.json`\r\n2. Run `npm install`\r\n\r\n## Usage Examples\r\n\r\n### `getData`\r\n\r\n`getData()` can be used to get raw data about a function's caller\r\n\r\n    var callerId = require('caller-id');\r\n\r\n    // 1. Function calling another function\r\n    function foo() {\r\n        bar();\r\n    }\r\n    function bar() {\r\n        var caller = callerId.getData();\r\n        /*\r\n        caller = {\r\n            typeName: 'Object',\r\n            functionName: 'foo',\r\n            filePath: '/path/of/this/file.js',\r\n            lineNumber: 5,\r\n            topLevelFlag: true,\r\n            nativeFlag: false,\r\n            evalFlag: false\r\n        }\r\n        */\r\n    }\r\n\r\n    // 2. Method in a class calling a function\r\n    function Lorem() {}\r\n    Lorem.prototype.ipsum = function() {\r\n        baz();\r\n    }\r\n    function baz() {\r\n        var caller = callerId.getData();\r\n        /*\r\n        caller = {\r\n            typeName: 'Lorem',\r\n            functionName: 'Lorem.ipsum',\r\n            methodName: 'ipsum',\r\n            filePath: '/path/of/this/file.js',\r\n            lineNumber: 25,\r\n            topLevelFlag: false,\r\n            nativeFlag: false,\r\n            evalFlag: false\r\n        }\r\n        */\r\n    }\r\n\r\n    // 3. Function in an eval calling another function\r\n    function func() {\r\n        var caller = callerId.getData();\r\n        /*\r\n        caller = {\r\n            typeName: 'Object',\r\n            functionName: 'evil',\r\n            lineNumber: 2,\r\n            topLevelFlag: true,\r\n            nativeFlag: false,\r\n            evalFlag: true,\r\n            evalOrigin: 'eval at <anonymous> (/path/of/this/file.js:58:7)'\r\n        }\r\n        */\r\n    }\r\n    eval('(function evil() {' + '\\\\n' +\r\n        'func();' + '\\\\n' +\r\n        '})();');\r\n\r\n### `getString`\r\n\r\n`getString()` returns a brief string representing a function's caller\r\n\r\n    var callerId = require('caller-id');\r\n\r\n    function myFunction() {\r\n        var callerString = callerId.getString();\r\n    }\r\n\r\nUsing the same examples as above, `getString()` returns the following:\r\n\r\n1.  foo\r\n2.  Lorem.ipsum\r\n3.  (eval)evil\r\n\r\n### `getDetailedString`\r\n\r\n`getDetailedString()` returns a more detailed string representing a function's caller\r\n\r\n    var callerId = require('caller-id');\r\n\r\n    function myFunction() {\r\n        var detailedCallerString = callerId.getDetailedString();\r\n    }\r\n\r\nUsing the same examples as above, `getDetailedString()` returns the following:\r\n\r\n1.  foo at /path/of/this/file.js:5\r\n2.  Lorem.ipsum at /path/of/this/file.js:25\r\n3.  eval at <anonymous> (/path/of/this/file.js:58:7)",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/pixelsandbytes/caller-id.git"
  },
  "version": "0.1.0"
}
