{
  "_id": "find-pkg",
  "maintainers": [
    {
      "name": "jonschlinkert",
      "email": "github@sellside.com"
    }
  ],
  "keywords": [
    "filepath",
    "find",
    "findup",
    "findup-sync",
    "json",
    "lookup",
    "package",
    "package-json",
    "pkg",
    "resolve",
    "sync"
  ],
  "dist-tags": {
    "latest": "2.0.0"
  },
  "author": {
    "name": "Jon Schlinkert",
    "url": "https://github.com/jonschlinkert"
  },
  "_rev": "9-92905e46e9ee0fc840c3eb29f3669f4c",
  "description": "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.",
  "readme": "# find-pkg [![NPM version](https://img.shields.io/npm/v/find-pkg.svg?style=flat)](https://www.npmjs.com/package/find-pkg) [![NPM monthly downloads](https://img.shields.io/npm/dm/find-pkg.svg?style=flat)](https://npmjs.org/package/find-pkg) [![NPM total downloads](https://img.shields.io/npm/dt/find-pkg.svg?style=flat)](https://npmjs.org/package/find-pkg) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/find-pkg.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/find-pkg)\n\n> Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save find-pkg\n```\n\n## Usage\n\n```js\nconst findPkg = require('find-pkg');\n```\n\n**promise**\n\n```js\nfindPkg('a/b/c/some/path')\n  .then(file => console.log(file)) //=> /User/jonschlinkert/dev/a/b/package.json\n  .catch(console.error);\n```\n\n**async-await**\n\n```js\n(async function() {\n  const file = await findPkg('a/b/c/some/path');\n  console.log(file);\n  //=> '/Users/jonschlinkert/dev/a/b/package.json'\n})();\n```\n\n**callback**\n\n```js\nfindPkg('a/b/c/some/path', function(err, file) {\n  if (err) throw err;\n  console.log(file);\n  //=> '/Users/jonschlinkert/dev/a/b/package.json'\n});\n```\n\n**sync**\n\n```js\nconst file = findPkg.sync('a/b/c/some/path');\n//=> '/Users/jonschlinkert/dev/a/b/package.json'\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [find-file-up](https://www.npmjs.com/package/find-file-up): Find a file fast, by starting at the given cwd and recursing up one directory… [more](https://github.com/jonschlinkert/find-file-up) | [homepage](https://github.com/jonschlinkert/find-file-up \"Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.\")\n* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/js-cli/node-findup-sync#readme) | [homepage](https://github.com/js-cli/node-findup-sync#readme \"Find the first file matching a given pattern in the current directory or the nearest ancestor directory.\")\n* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules \"The directory used by npm for globally installed npm modules.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 28, 2018._",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/jonschlinkert/find-pkg.git"
  },
  "users": {
    "nichoth": true
  },
  "bugs": {
    "url": "https://github.com/jonschlinkert/find-pkg/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "name": "find-pkg",
      "description": "Find the first directory with a package.json, recursing up, starting with the given directory.",
      "version": "0.1.0",
      "homepage": "https://github.com/jonschlinkert/find-pkg",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/find-pkg.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/find-pkg/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=0.10.0"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "find-file-up": "^0.1.0"
      },
      "devDependencies": {
        "delete": "^0.2.1",
        "mocha": "*",
        "resolve-dir": "^0.1.0"
      },
      "verb": {
        "related": {
          "list": [
            "find-file-up",
            "look-up",
            "load-pkg",
            "load-module-pkg",
            "module-root"
          ]
        }
      },
      "gitHead": "11a92a8379d6f35653d9da2b8dbf224b653c54e3",
      "_id": "find-pkg@0.1.0",
      "_shasum": "32b7422fc432c74c1bb20ba60b9d64af621b57da",
      "_from": ".",
      "_npmVersion": "3.3.6",
      "_nodeVersion": "5.0.0",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "dist": {
        "shasum": "32b7422fc432c74c1bb20ba60b9d64af621b57da",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/find-pkg/-/find-pkg-0.1.0.tgz",
        "integrity": "sha512-BuZlIYPora72XOiqR+79Fvl7zsmQbeb8XCj7/OCAfNEiYWU74gTeaRJGSMgHQ/OtfuMpdDFmxuysA7kD1ggvGw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCRoS/+/lbw+77rBX2yA9TpoDftpSb+5Wuu909UqEWoHwIgdkWFW60LF/bpK8nbQsO79l9o1MlMBEc2drpA8dDZP38="
          }
        ]
      },
      "directories": {}
    },
    "0.1.1": {
      "name": "find-pkg",
      "description": "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.",
      "version": "0.1.1",
      "homepage": "https://github.com/jonschlinkert/find-pkg",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/find-pkg.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/find-pkg/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=0.10.0"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "find-file-up": "^0.1.1"
      },
      "devDependencies": {
        "delete": "^0.2.1",
        "mocha": "*",
        "resolve-dir": "^0.1.0"
      },
      "verb": {
        "related": {
          "list": [
            "find-file-up",
            "look-up",
            "load-pkg",
            "load-module-pkg",
            "module-root"
          ]
        }
      },
      "gitHead": "dbb96b2ca9d3305781c719a6bea4fe7852b1bc0e",
      "_id": "find-pkg@0.1.1",
      "_shasum": "fba1b96a75ee2e1f298bb477d264b0b44c79144b",
      "_from": ".",
      "_npmVersion": "3.3.6",
      "_nodeVersion": "5.0.0",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "dist": {
        "shasum": "fba1b96a75ee2e1f298bb477d264b0b44c79144b",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/find-pkg/-/find-pkg-0.1.1.tgz",
        "integrity": "sha512-K5vXcZ5wNvoz6dK2ZOAUHtwGMKBMG/3ZIXvZbGXgxO58iJ6IwMivMxuJ0+eDPb/RIp3W0SUa2Mki5m/3k/QrIg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDBpcEwh8Gl9iHf1O9yMzADiRtfLPmKf0d7EfLzPdxI/gIgAbfQYnJ2ITbzfODsMrMLFp/6KGVL7OBtw2N2ykmoG8U="
          }
        ]
      },
      "directories": {}
    },
    "0.1.2": {
      "name": "find-pkg",
      "description": "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.",
      "version": "0.1.2",
      "homepage": "https://github.com/jonschlinkert/find-pkg",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/find-pkg.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/find-pkg/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=0.10.0"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "find-file-up": "^0.1.2"
      },
      "devDependencies": {
        "delete": "^0.3.2",
        "gulp-format-md": "^0.1.9",
        "mocha": "^2.5.3",
        "resolve-dir": "^0.1.0"
      },
      "keywords": [
        "filepath",
        "find",
        "findup",
        "findup-sync",
        "json",
        "lookup",
        "package",
        "package-json",
        "pkg",
        "resolve",
        "sync"
      ],
      "verb": {
        "related": {
          "list": [
            "find-file-up",
            "load-module-pkg",
            "load-pkg",
            "look-up",
            "module-root"
          ]
        },
        "reflinks": [
          "find-file-up",
          "look-up",
          "verb"
        ],
        "toc": false,
        "layout": "default",
        "tasks": [
          "readme"
        ],
        "plugins": [
          "gulp-format-md"
        ],
        "lint": {
          "reflinks": true
        }
      },
      "gitHead": "e319e9e46c44f1c4e842fc711dca853bfada36a9",
      "_id": "find-pkg@0.1.2",
      "_shasum": "1bdc22c06e36365532e2a248046854b9788da557",
      "_from": ".",
      "_npmVersion": "3.8.9",
      "_nodeVersion": "6.2.0",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "dist": {
        "shasum": "1bdc22c06e36365532e2a248046854b9788da557",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/find-pkg/-/find-pkg-0.1.2.tgz",
        "integrity": "sha512-0rnQWcFwZr7eO0513HahrWafsc3CTFioEB7DRiEYCUM/70QXSY8f3mCST17HXLcPvEhzH/Ty/Bxd72ZZsr/yvw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIA16DvqDE1E4EbEVnrNbiH2+PaJZTtiGBO3hHOpKPraHAiEA0y6ZcTGXbULE0nhMx2lAYT9s/pv+Z72x8bQhZz+9MDE="
          }
        ]
      },
      "_npmOperationalInternal": {
        "host": "packages-12-west.internal.npmjs.com",
        "tmp": "tmp/find-pkg-0.1.2.tgz_1465123074957_0.34422014583833516"
      },
      "directories": {}
    },
    "1.0.0": {
      "name": "find-pkg",
      "description": "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.",
      "version": "1.0.0",
      "homepage": "https://github.com/jonschlinkert/find-pkg",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/find-pkg.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/find-pkg/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=0.10.0"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "find-file-up": "^1.0.2"
      },
      "devDependencies": {
        "delete": "^1.0.1",
        "gulp-format-md": "^0.1.12",
        "mocha": "^3.4.1",
        "resolve-dir": "^1.0.0"
      },
      "keywords": [
        "filepath",
        "find",
        "findup",
        "findup-sync",
        "json",
        "lookup",
        "package",
        "package-json",
        "pkg",
        "resolve",
        "sync"
      ],
      "verb": {
        "related": {
          "list": [
            "find-file-up",
            "load-module-pkg",
            "load-pkg",
            "look-up",
            "module-root"
          ]
        },
        "reflinks": [
          "find-file-up",
          "look-up",
          "verb"
        ],
        "toc": false,
        "layout": "default",
        "tasks": [
          "readme"
        ],
        "plugins": [
          "gulp-format-md"
        ],
        "lint": {
          "reflinks": true
        }
      },
      "gitHead": "5bd9abd2d72779cb25462b6e073984d1c0ee724b",
      "_id": "find-pkg@1.0.0",
      "_shasum": "96db242e001c7c55025d32213302ea3aba677177",
      "_from": ".",
      "_npmVersion": "4.6.1",
      "_nodeVersion": "7.7.3",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "dist": {
        "shasum": "96db242e001c7c55025d32213302ea3aba677177",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/find-pkg/-/find-pkg-1.0.0.tgz",
        "integrity": "sha512-mz/zt+x9A/DPzP9zuOQhpe5C9jjH0vpFphUv1itUHmCuiObPF+C8Ngk9j36EhmUB/p8Y9jgjKndA9wy3eE9JkA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDPh9iG/AndpPqlBwBJ+gbRXKAqtFu8WdtsmeVJ0bX40wIgdw0Kcg9KWpmV1pGjBPQ2hG+QyJGt4XmVHNzvFEN5Ajk="
          }
        ]
      },
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/find-pkg-1.0.0.tgz_1495254203346_0.5638200419489294"
      },
      "directories": {}
    },
    "2.0.0": {
      "name": "find-pkg",
      "description": "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.",
      "version": "2.0.0",
      "homepage": "https://github.com/jonschlinkert/find-pkg",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/find-pkg.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/find-pkg/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=8"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "find-file-up": "^2.0.1"
      },
      "devDependencies": {
        "delete": "^1.1.0",
        "gulp-format-md": "^1.0.0",
        "mocha": "^3.5.3",
        "resolve-dir": "^1.0.1"
      },
      "keywords": [
        "filepath",
        "find",
        "findup",
        "findup-sync",
        "json",
        "lookup",
        "package",
        "package-json",
        "pkg",
        "resolve",
        "sync"
      ],
      "verb": {
        "toc": false,
        "layout": "default",
        "tasks": [
          "readme"
        ],
        "plugins": [
          "gulp-format-md"
        ],
        "related": {
          "list": [
            "find-file-up",
            "findup-sync",
            "global-modules"
          ]
        },
        "lint": {
          "reflinks": true
        }
      },
      "gitHead": "719515919029937f4619cb8107a8290240eb19e4",
      "_id": "find-pkg@2.0.0",
      "_npmVersion": "5.8.0",
      "_nodeVersion": "9.9.0",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "dist": {
        "integrity": "sha512-WgZ+nKbELDa6N3i/9nrHeNznm+lY3z4YfhDDWgW+5P0pdmMj26bxaxU11ookgY3NyP9GC7HvZ9etp0jRFqGEeQ==",
        "shasum": "3a7c35c704e11a6e5722c56e45bd7e587507735e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/find-pkg/-/find-pkg-2.0.0.tgz",
        "fileCount": 4,
        "unpackedSize": 6698,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCmYjvHDglZ1NCiU0Di/RXyHqhiV2fcKZguuQw1wGU9dAIgacML78Ku4WDlDWSSoF/onJ2wAeF2p1MhTrn7RVwNmZY="
          }
        ]
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/find-pkg_2.0.0_1522216764226_0.20853675363498803"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "find-pkg",
  "time": {
    "modified": "2026-05-22T15:26:33.052Z",
    "created": "2015-11-28T03:09:01.718Z",
    "0.1.0": "2015-11-28T03:09:01.718Z",
    "0.1.1": "2015-12-20T12:50:56.138Z",
    "0.1.2": "2016-06-05T10:37:57.180Z",
    "1.0.0": "2017-05-20T04:23:24.376Z",
    "2.0.0": "2018-03-28T05:59:24.265Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/jonschlinkert/find-pkg"
}