{
  "manifest": {
    "name": "parent-module",
    "version": "1.0.1",
    "description": "Get the path of the parent module",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/sindresorhus/parent-module.git"
    },
    "author": {
      "name": "Sindre Sorhus",
      "email": "sindresorhus@gmail.com",
      "url": "sindresorhus.com"
    },
    "engines": {
      "node": ">=6"
    },
    "scripts": {
      "test": "xo && ava"
    },
    "files": [
      "index.js"
    ],
    "keywords": [
      "parent",
      "module",
      "package",
      "pkg",
      "caller",
      "calling",
      "module",
      "path",
      "callsites",
      "callsite",
      "stacktrace",
      "stack",
      "trace",
      "function",
      "file"
    ],
    "dependencies": {
      "callsites": "^3.0.0"
    },
    "devDependencies": {
      "ava": "^1.4.1",
      "execa": "^1.0.0",
      "xo": "^0.24.0"
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-parent-module-1.0.1-691d2709e78c79fae3a156622452d00762caaaa2-integrity/node_modules/parent-module/package.json",
    "readmeFilename": "readme.md",
    "readme": "# parent-module [![Build Status](https://travis-ci.org/sindresorhus/parent-module.svg?branch=master)](https://travis-ci.org/sindresorhus/parent-module)\n\n> Get the path of the parent module\n\nNode.js exposes `module.parent`, but it only gives you the first cached parent, which is not necessarily the actual parent.\n\n\n## Install\n\n```\n$ npm install parent-module\n```\n\n\n## Usage\n\n```js\n// bar.js\nconst parentModule = require('parent-module');\n\nmodule.exports = () => {\n\tconsole.log(parentModule());\n\t//=> '/Users/sindresorhus/dev/unicorn/foo.js'\n};\n```\n\n```js\n// foo.js\nconst bar = require('./bar');\n\nbar();\n```\n\n\n## API\n\n### parentModule([filepath])\n\nBy default, it will return the path of the immediate parent.\n\n#### filepath\n\nType: `string`<br>\nDefault: [`__filename`](https://nodejs.org/api/globals.html#globals_filename)\n\nFilepath of the module of which to get the parent path.\n\nUseful if you want it to work [multiple module levels down](https://github.com/sindresorhus/parent-module/tree/master/fixtures/filepath).\n\n\n## Tip\n\nCombine it with [`read-pkg-up`](https://github.com/sindresorhus/read-pkg-up) to read the package.json of the parent module.\n\n```js\nconst path = require('path');\nconst readPkgUp = require('read-pkg-up');\nconst parentModule = require('parent-module');\n\nconsole.log(readPkgUp.sync({cwd: path.dirname(parentModule())}).pkg);\n//=> {name: 'chalk', version: '1.0.0', …}\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
    "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz",
    "hash": "691d2709e78c79fae3a156622452d00762caaaa2",
    "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
    "registry": "npm",
    "packageName": "parent-module",
    "cacheIntegrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI="
  },
  "registry": "npm",
  "hash": "691d2709e78c79fae3a156622452d00762caaaa2"
}