{
  "_id": "import-cwd",
  "maintainers": [
    {
      "name": "sindresorhus",
      "email": "sindresorhus@gmail.com"
    }
  ],
  "keywords": [
    "require",
    "resolve",
    "path",
    "module",
    "from",
    "like",
    "cwd",
    "current",
    "working",
    "directory",
    "import"
  ],
  "dist-tags": {
    "latest": "3.0.0"
  },
  "author": {
    "name": "Sindre Sorhus",
    "email": "sindresorhus@gmail.com",
    "url": "sindresorhus.com"
  },
  "_rev": "6-3adee17d83cba129a2667b0486f4ec59",
  "description": "Import a module like with `require()` but from the current working directory",
  "readme": "# import-cwd [![Build Status](https://travis-ci.org/sindresorhus/import-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/import-cwd)\n\n> Import a module like with [`require()`](https://nodejs.org/api/globals.html#globals_require) but from the current working directory\n\n\n## Install\n\n```\n$ npm install import-cwd\n```\n\n\n## Usage\n\n```js\nconst importCwd = require('import-cwd');\n\n// Target module is at '/Users/sindresorhus/unicorn/foo.js'\n\nconsole.log(__dirname);\n//=> '/Users/sindresorhus/rainbow'\n\nconsole.log(process.cwd());\n//=> '/Users/sindresorhus/unicorn'\n\nconst foo = importCwd('./foo');\n```\n\n\n## API\n\n### importCwd(moduleId)\n\nLike `require()`, throws when the module can't be found.\n\n### importCwd.silent(moduleId)\n\nReturns `undefined` instead of throwing when the module can't be found.\n\n#### moduleId\n\nType: `string`\n\nWhat you would use in `require()`.\n\n\n## Related\n\n- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path\n- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path\n- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory\n- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point\n- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily\n- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/sindresorhus/import-cwd.git"
  },
  "users": {
    "rocket0191": true,
    "flumpus-dev": true
  },
  "bugs": {
    "url": "https://github.com/sindresorhus/import-cwd/issues"
  },
  "license": "MIT",
  "versions": {
    "2.1.0": {
      "name": "import-cwd",
      "version": "2.1.0",
      "description": "Import a module like with `require()` but from the current working directory",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sindresorhus/import-cwd.git"
      },
      "author": {
        "name": "Sindre Sorhus",
        "email": "sindresorhus@gmail.com",
        "url": "sindresorhus.com"
      },
      "engines": {
        "node": ">=4"
      },
      "scripts": {
        "test": "xo && ava"
      },
      "files": [
        "index.js"
      ],
      "keywords": [
        "require",
        "resolve",
        "path",
        "module",
        "from",
        "like",
        "cwd",
        "current",
        "working",
        "directory",
        "import"
      ],
      "dependencies": {
        "import-from": "^2.1.0"
      },
      "devDependencies": {
        "ava": "*",
        "xo": "*"
      },
      "gitHead": "176362fb0b3dd755ecc612ef314cab89f73d239c",
      "bugs": {
        "url": "https://github.com/sindresorhus/import-cwd/issues"
      },
      "homepage": "https://github.com/sindresorhus/import-cwd#readme",
      "_id": "import-cwd@2.1.0",
      "_shasum": "aa6cf36e722761285cb371ec6519f53e2435b0a9",
      "_from": ".",
      "_npmVersion": "4.2.0",
      "_nodeVersion": "7.10.0",
      "_npmUser": {
        "name": "sindresorhus",
        "email": "sindresorhus@gmail.com"
      },
      "dist": {
        "shasum": "aa6cf36e722761285cb371ec6519f53e2435b0a9",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/import-cwd/-/import-cwd-2.1.0.tgz",
        "integrity": "sha512-Ew5AZzJQFqrOV5BTW3EIoHAnoie1LojZLXKcCQ/yTRyVZosBhK1x1ViYjHGf5pAFOq8ZyChZp6m/fSN7pJyZtg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQC6aBpHXViWXgO8WRk9znpo5w8yYXHT6w6OT+FiQ+J1aAIhANi3n4gbHzg1wb0AH1jyLhhCk3v/5ZeE3/Qchvi6/yHm"
          }
        ]
      },
      "maintainers": [
        {
          "name": "sindresorhus",
          "email": "sindresorhus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/import-cwd-2.1.0.tgz_1495359582224_0.1513209668919444"
      },
      "directories": {}
    },
    "3.0.0": {
      "name": "import-cwd",
      "version": "3.0.0",
      "description": "Import a module like with `require()` but from the current working directory",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sindresorhus/import-cwd.git"
      },
      "author": {
        "name": "Sindre Sorhus",
        "email": "sindresorhus@gmail.com",
        "url": "sindresorhus.com"
      },
      "engines": {
        "node": ">=8"
      },
      "scripts": {
        "test": "xo && ava && tsd"
      },
      "keywords": [
        "require",
        "resolve",
        "path",
        "module",
        "from",
        "like",
        "cwd",
        "current",
        "working",
        "directory",
        "import"
      ],
      "dependencies": {
        "import-from": "^3.0.0"
      },
      "devDependencies": {
        "ava": "^1.4.1",
        "tsd": "^0.7.2",
        "xo": "^0.24.0"
      },
      "gitHead": "5b732738ffe1220fe93748726c98d41a76a6caa3",
      "bugs": {
        "url": "https://github.com/sindresorhus/import-cwd/issues"
      },
      "homepage": "https://github.com/sindresorhus/import-cwd#readme",
      "_id": "import-cwd@3.0.0",
      "_nodeVersion": "10.15.3",
      "_npmVersion": "6.9.0",
      "_npmUser": {
        "name": "sindresorhus",
        "email": "sindresorhus@gmail.com"
      },
      "dist": {
        "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==",
        "shasum": "20845547718015126ea9b3676b7592fb8bd4cf92",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/import-cwd/-/import-cwd-3.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 4874,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxHsmCRA9TVsSAnZWagAAKIsP/jijfe/9XsyuKZebN1DW\nmZmJ7TeFMVKYrP9p5FcuRipYTwVb9wb2fIcriEz0WY5J6b7xKg14xf8g3MRa\nGJqRqpo2QFU5jjbmckXz+yF4B5JQcXVEqwNSeNOncIRWWRGqzFSM4KIhjAXl\nXeCypVBuYM0kB5lXI5MUHpALDnLs8VQL9rzWsuDeCQFCWnduTqtq+mxuTRK5\nhWZ9+6bgdrXFvtP7cHVm+wayPTChuqQUtpHG9McECNHZFAMr1ucwWhNioFx1\n1Im0fw4EjmVD+SqtCh24Xcnldlgir3JZtThh1WP5Sy5V46fvY+3rzfUEpwOQ\nFROdWNHAChdjj0W3oVW4lu4+BpQybxEFZ1p3mrwW84IPkeQ5qCOQPV13W7ZN\ndJrSIC3DQZjAskGrhKwuGUAQTL4vzbI118eoyesVGfyF9mfnYtIH96Ve8NtK\nUjgfV9mJoWnKuqIDsd1c40n95dXBBJ2BqBGDq9Ivzw1qTgX4okmq4MMBysE/\nIDKijXI35NOQ4NQjgF8I+V/yIY4TGtUcB0ZwBsqm/WR+7QX8Aj5qb/8zQNbL\nRysXjSuSpBymlTd0v2oNKGp+fcxRoKZIF+rB96lmTOtOMsOtsxusQTI4ClXJ\nFxz0xndH4bmxn5KpvIWEmbI8dMJN/1bKKH0/NNcXE7FBVk2ztAoDJ+loyAcA\nodo6\r\n=jn+e\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIE8E1n0FzkfpcAJRiicbu6x875q9L1rpUy0cdLymg0TnAiEAzpOk8Tn+AP2vrBbQberqCXMqCAC173gVVZQ2EqtpSp8="
          }
        ]
      },
      "maintainers": [
        {
          "name": "sindresorhus",
          "email": "sindresorhus@gmail.com"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/import-cwd_3.0.0_1556380453585_0.6113070738008739"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "import-cwd",
  "time": {
    "modified": "2026-05-24T07:56:32.481Z",
    "created": "2017-05-21T09:39:42.349Z",
    "2.1.0": "2017-05-21T09:39:42.349Z",
    "3.0.0": "2019-04-27T15:54:13.728Z"
  },
  "readmeFilename": "readme.md",
  "homepage": "https://github.com/sindresorhus/import-cwd#readme"
}