Skip to main content
Glama
b6e1595221d4acb9f5c4833cd435aa8fa02b264096977558ac99a7447e783be99f639e4ca7955ab164040e56a10daa2c167c8d204f7234b0ac178f08a59018.3 kB
{"_id":"parent-module","_rev":"14-67899b514f1f5db14bc083e57a78c55d","name":"parent-module","dist-tags":{"latest":"3.2.0"},"versions":{"0.1.0":{"name":"parent-module","version":"0.1.0","keywords":["parent","module","package","pkg","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"parent-module@0.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/parent-module","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"dist":{"shasum":"b5292863a1e8c476ecf857e7d75c98920b24b8a6","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-0.1.0.tgz","integrity":"sha512-fkZFUUL8tSsJUm/WvAqyJLV/Aj9/jpnMXHy0leJYEUu2qw5FE6nJQI/bMVW2xbZySot4uaPb6cw4eY5zQn7/Ww==","signatures":[{"sig":"MEYCIQDZY8MMMirTy0zXEW/DWQMPb5mJzvc7SyPcSkiEAaQmLwIhALRon4A7+SwJ5LrpBeD6e96QRtcT2PsQlvWDYP+hnYen","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"b5292863a1e8c476ecf857e7d75c98920b24b8a6","engines":{"node":">=0.10.0"},"gitHead":"0ebdd4a7582d4cee30ca2151fbd592b4b3b20ff2","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"https://github.com/sindresorhus/parent-module","type":"git"},"_npmVersion":"2.14.12","description":"Get the path of the parent module","directories":{},"_nodeVersion":"4.2.4","dependencies":{"callsites":"^1.0.0"},"devDependencies":{"xo":"*","ava":"*","execa":"^0.2.2"}},"1.0.0":{"name":"parent-module","version":"1.0.0","keywords":["parent","module","package","pkg","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"parent-module@1.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/parent-module#readme","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"dist":{"shasum":"df250bdc5391f4a085fb589dad761f5ad6b865b5","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz","fileCount":4,"integrity":"sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==","signatures":[{"sig":"MEYCIQCdHOsgZBScqqrxAKhdenELVIH1+pBigyWWzHZML/WLDwIhAIcTgCIn7BQ8cJO9E8ydVHPoWz12CaN/taXYRUgvP+m5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcIlHoCRA9TVsSAnZWagAA7j8P/iXA1TC9HTMKzU1Ye5X4\ntOtox1HhIfp7VwNnFVti2GytUXxmlfs0r8UaCfcIk8IBAARsvKDREp3LobS3\n1ZbX5st+42h+b2oycKQkUhBaN//PZhp/WVTrA9vzRz07JS7ZqEu2j5t0iznb\nBdavKmC6OfzY3B3rsDpHukc1uhWDnQJMFb9S1NVObKlTjKcIkAYlissa8eue\n10WvvQzdCNIZlxU2G6XGezAYw2N7HvdmoyCOrgC+jb4GguE57467rrI/My5u\nL1NqFLaeiaB0w5V+mb5O3lkyxFPVHeqf6NoeWn6oeoeZ6fOugJbq4+MSQ5sJ\nReYJfAfcNmTPyXwLZFC36F/zZVxztfLiLQAyx1IIEP0A9NNXiOCUhx1F6PA1\n0xePgwCP4TgwBH79di4DXvmNvzCFj3W67F1KPna51FQTkxKU4MdCvCsejiiY\nmQFmz0UkqiXeUfKp0eKmRF+GTx5d6LhHrhHStFU8xEcjO19nu22vEQ1GLyLw\nplNWVvBTUskpOgK0yxcbwSB4G/9xxTrAQYr5O39ND1tD8qoCDxeHbRCWj2ya\n1HGFBXCe5gAr5PV+RHwIfUwMM7tuoUQgEcpKC5IVppnHE2I2Ay6aC+/lN713\nn5zICEuseMRuuqJLesGXcvkqXN6W/3cO9hsjcFS9c+BAcpgncvY+8EaAHmjV\nvsWu\r\n=VW5f\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=6"},"gitHead":"21d44dd4d566218c6abd1b8747469756fba455d6","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/parent-module.git","type":"git"},"_npmVersion":"6.4.1","description":"Get the path of the parent module","directories":{},"_nodeVersion":"11.5.0","dependencies":{"callsites":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.23.0","ava":"^1.0.1","execa":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/parent-module_1.0.0_1545753063775_0.45941122354092845","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"parent-module","version":"1.0.1","keywords":["parent","module","package","pkg","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"parent-module@1.0.1","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/parent-module#readme","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"dist":{"shasum":"691d2709e78c79fae3a156622452d00762caaaa2","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz","fileCount":4,"integrity":"sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==","signatures":[{"sig":"MEUCIH0o9dG06lHpdesOZRHLalVMES4OwKx40Db5qlXGMeI2AiEAuT6JtVLbiHQhF0YM+0LOWNmKt3pqYZmksmHz8J1NZhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnLEgCRA9TVsSAnZWagAAnfUP/34CM4qiVo4Qaylc5j9N\naflPKZecVGFTivIGy9F7I+dTMiCXRhABp0MaLq1s03KOHAgym2ZL89ItB+l9\ngeUhRz7hFcTm4sP+iEtBQ0D+vr0Q+arS7qoROTXJ94ybC0rC/+Hr9XyvXZRX\nW0KQYkekqyTn5AIH1ZN7o0zgnfapdTgz7zBhGTsICqd1jl3FFJLshsXowO1X\naBCErOvowwQKaTVWnU65cIuMKKN9g80jIWZVYu5F6B9VOUOV7moGY3C0GofN\nD/b2lSMlF8En4UbiSI1F0NmGwnbDplri5KsHyXAFSoVhQFp65VQBJjZU/DnM\n8S8zan/8jpAAxAw7cZZ0G911zDLh+Jo7HuB+xc+dwLbK8fONAJOVFkRLAdCJ\nGC/XcyZ5ftPTwmDbn3wLOdk8UZytBP/FD69NU4HTvPkG2SkKAbv0jK+nIJEs\ncaQGh42m7mFEhmiXBLJZ83UAFlVsyAej9s14GRet3fAqWhIbnzdv9boQwYSi\nTGy0kxGtaaa8G/WcBZyn+hGGPlakNn0RUV6ZhZ0y5zpaM/YPFS885Oj0i8Um\nhuwvIYCf6hlxcLylUI/BY+HLzp2W7qFABT+ib7VA3QHznyW21tyHqXGXWiiu\n9urgGmksS5dhsEF4vYzZPN80xAI4qXf5pIBMUzB0b1kvemyCGJ/9FCxUghlt\nqqUz\r\n=Y7oh\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=6"},"gitHead":"48267d001c4d215ba21a701a6882dba30fb8d614","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/parent-module.git","type":"git"},"_npmVersion":"6.9.0","description":"Get the path of the parent module","directories":{},"_nodeVersion":"8.15.0","dependencies":{"callsites":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","execa":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/parent-module_1.0.1_1553772832186_0.1578223180001468","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"parent-module","version":"2.0.0","keywords":["parent","module","package","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"parent-module@2.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/parent-module#readme","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"dist":{"shasum":"fa71f88ff1a50c27e15d8ff74e0e3a9523bf8708","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz","fileCount":5,"integrity":"sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==","signatures":[{"sig":"MEUCICmQCYnaIZ1l00dvvfSVtxPE9vaATS8BsGo3Lhav91Q7AiEA6uiYRdPyzE4+fo8zrPAUfML7VHHqUaqvxDzcyFYW2Ck=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyFjVCRA9TVsSAnZWagAA/yQP/3p0SAYda/UfvdMK1J3A\necG8eD/cd8XMG9f7mcyvdOkd2YM3IPfu0capE6kP4Wp9TkZPnpMTxguu2oxe\ni+mssu1Dd/L8LMxxsbsU7V3EyX2QV0dGsiB91H/QlPRfr3WapnL660JTNaze\n0cQF9vOs8GfTUCrsm3IOxuPJHiAkxs4udS1NzgNsGh5custjt9tP5Dx8fu8j\nCFDzT6R38iEV2Cn2w0IIQzJBkhQ5XuKgiex8RMtvKRa+fWSSwkQlMRM+9QRE\n5x1ACxEbFiubXr0pG3eZt6gMR8cCoxZjqOfXOAS6c5BGunVDLDY7UpJnhQEH\nfgJqbpzTsXYtaoDN9O4U1UloGyiLYKu8bTigBBfsPc5d/L0vUtWK4kw6XX6F\nHZuqQibUlTcXWc17zKyb+QOtTcIs2LAOhd0YB+vNxf45whQyO+bwl+N3LAd1\nJz5qh/kUw4/0YtQZuTrqbl58F2/hk/zGPpS8rbF4Nk25pi+sdzuqMpGuXMhF\ngTMTg1SmgVX4O29hKtLqiTE8+1T/mQR25mm7MfNmM0go1nHUmEe6tzA71Qb1\nvBnVimAkAxXTKdd8p5KchKNpYo+hJ+OKPpdt8LEwZlGm9Qs+5+INtDwHUTts\nZP3FvhmRX3oDhAavOEBM7wtX6oQR8IROq32aKPJ8jn6KdrixER/htTKDqQLM\nyLn+\r\n=G19r\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8"},"gitHead":"1923bf8f724f7f2e77a2c893116285a8b0a47598","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/parent-module.git","type":"git"},"_npmVersion":"6.9.0","description":"Get the path of the parent module","directories":{},"_nodeVersion":"8.16.0","dependencies":{"callsites":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.2","execa":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/parent-module_2.0.0_1556633813147_0.3310203047620397","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"parent-module","version":"3.0.0","keywords":["parent","module","package","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"parent-module@3.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/parent-module#readme","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"dist":{"shasum":"4bddc5cc0584935189977bae3384cc66dedde363","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-3.0.0.tgz","fileCount":5,"integrity":"sha512-zJXn5iKdXXUV51iC7O4nHiPs/eWnkd0obrHDlOKQ6/MafFrxljinW6hCkr0UTsAGq7B+NXT2wIfLshcD+5RvIw==","signatures":[{"sig":"MEQCIC/Fj9QO37vURVKlLGmOKOuJUaPovPItL/wAywaz1RxBAiAWrnwe9itWtPuCZQkeCTYME3fh5C/vG6jjKX2dE/y4Sw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh22RrCRA9TVsSAnZWagAA0jcP/AlCpLLxFecwaCI5BD9p\nGVJ5tSYVZyEKyt++9zZmYZ9NkpOAzdjwpwofWXPto+C++msR5ZQPJLFmHuXm\nvqJT39rsizQkMW3lnSS3svWKHAk/MLkxtOOAEV2rVqNDBMcIgLqNR5/BjB3j\nEtf57OkNM0Gat7KsJWlWSe8jghktZo+fHeSB8+4p9H2i+ITkOGtv6K9janTK\n/XaZ4RWEFyxPZsWc6EUEZxDKKL0Oy52WglfGg6bnhdpiBfhhUC6BepUmpZDO\nOsk0uzUi44e0oSci8lYW5IP3R4gRZW0JLsLWu8t8dQmQ0SaMxzp8PlLGZja9\nmz+bdHhLJgsjb4RucIe0CMWWAm1g2Nz3QgAOkXf+0vW4TqoJmI9ikyaroYTM\nRsBqg2yv/vIXbv354htHnOwJyJrvJDiB5cF058pqT59PLnbhsHQm8Mu+l4BI\nxRGaJsLSHuT7gjdc8jkge//v/Oy/jXr3fvVMpcuVrARAhuG0hwVkOkoDu8ZP\n/N372RqZhxCwpQiySAXZhm+IpD97hZngGYXbJWIgCGUHVWjU787YO5aHQGGL\nGJUpFkD5kg7CKHI2IeXzqsjECPQcZxBul448b8ioqeNCyiBIIUvrqbZfo8KS\nxe2V15wOf3KpZ+4NyipBoM0xpPj6YoP+zvZmi+DHLI4cuF9sZ6WRPyui4aM7\nw0MW\r\n=WtnO\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"e99192a8f6870dde49947643c7324a3797515de6","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/parent-module.git","type":"git"},"_npmVersion":"7.20.3","description":"Get the path of the parent module","directories":{},"_nodeVersion":"12.22.1","dependencies":{"callsites":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.45.0","ava":"^3.15.0","tsd":"^0.17.0","execa":"^5.1.1"},"_npmOperationalInternal":{"tmp":"tmp/parent-module_3.0.0_1633335216602_0.5745603950022955","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"parent-module","version":"3.1.0","keywords":["parent","module","package","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"parent-module@3.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/parent-module#readme","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"dist":{"shasum":"bcba90b465fa3ba029fad2a933f4c683668a2148","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-3.1.0.tgz","fileCount":5,"integrity":"sha512-FX4TpKXX6CesSm1D9y5IcF0/KdDjP/w0c1AKqreGZne2QyWiPWHfoApMaJl8zvH3DTh+xtVmlLIUqSSoPYjqLQ==","signatures":[{"sig":"MEYCIQDvbeJmShR+CeYeLE4/JA30I9wLHEXJNzmTZn1Am+FKjgIhANXOt3jeDgiLm8vngKrM1DdDxiNjVm4qIFxDkoHrfvQq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4939},"type":"module","types":"./index.d.ts","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"f579e1737e12b120650997e16fef12dbced4938b","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/parent-module.git","type":"git"},"_npmVersion":"9.2.0","description":"Get the path of the parent module","directories":{},"_nodeVersion":"18.16.1","dependencies":{"callsites":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.45.0","ava":"^3.15.0","tsd":"^0.17.0","execa":"^5.1.1"},"_npmOperationalInternal":{"tmp":"tmp/parent-module_3.1.0_1694672794314_0.07498039719627103","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"parent-module","version":"3.2.0","description":"Get the path of the parent module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/parent-module.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["parent","module","package","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"callsites":"^4.1.0"},"devDependencies":{"ava":"^3.15.0","execa":"^5.1.1","tsd":"^0.17.0","xo":"^0.45.0"},"_id":"parent-module@3.2.0","gitHead":"3e3193aa846d410e79b1f98dc08fa2801b15147e","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"homepage":"https://github.com/sindresorhus/parent-module#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-2Ik9vslIJdx+teObUMPbYd5ONHrTh0EH6o88qNQqU2o+JKPR13V5cmoWmCBn3G7V5pyomexaZixyQoHfzl5E4g==","shasum":"016bea3ac5a71d06f65697708c03dcaaf00ac33b","tarball":"https://registry.npmjs.org/parent-module/-/parent-module-3.2.0.tgz","fileCount":5,"unpackedSize":5049,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBgQJXpMkvyudyIK4sElVCwW0m9CDaIt688+33B2eHC3AiAFzcfG9T3QXdLeN8N7m3+W7EY75gI5Ln7WkQO2/xPg5w=="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/parent-module_3.2.0_1757920845163_0.3273513190725885"},"_hasShrinkwrap":false}},"time":{"created":"2016-01-22T15:05:41.453Z","modified":"2025-09-15T07:20:45.510Z","0.1.0":"2016-01-22T15:05:41.453Z","1.0.0":"2018-12-25T15:51:03.878Z","1.0.1":"2019-03-28T11:33:52.331Z","2.0.0":"2019-04-30T14:16:53.267Z","3.0.0":"2021-10-04T08:13:36.738Z","3.1.0":"2023-09-14T06:26:34.494Z","3.2.0":"2025-09-15T07:20:45.338Z"},"bugs":{"url":"https://github.com/sindresorhus/parent-module/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/parent-module#readme","keywords":["parent","module","package","caller","calling","module","path","callsites","callsite","stacktrace","stack","trace","function","file"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/parent-module.git"},"description":"Get the path of the parent module","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"readme":"# parent-module\n\n> Get the path of the parent module\n\nThis module provides a reliable way to get the file path of the module that called your code, working correctly with both CommonJS and ESM modules.\n\n## Install\n\n```sh\nnpm install parent-module\n```\n\n## Usage\n\n```js\n// bar.js\nimport parentModule from 'parent-module';\n\nexport default function bar() {\n\tconsole.log(parentModule());\n\t//=> '/Users/sindresorhus/dev/unicorn/foo.js'\n}\n```\n\n```js\n// foo.js\nimport bar from './bar.js';\n\nbar();\n```\n\n## API\n\n### parentModule(filePath?)\n\nReturns: `string | undefined`\n\nReturns the file path of the immediate parent module, or `undefined` if there is no parent module (for example, when called from the top-level of an entry module).\n\n#### filePath\n\nType: `string`\\\nDefault: `import.meta.filename`\n\nThe file path of the module for which to get the parent path.\n\nUseful for getting the parent of a specific module when the call traverses [multiple module levels](fixtures/filepath).\n\n## Tip\n\nCombine it with [`read-package-up`](https://github.com/sindresorhus/read-package-up) to read the package.json of the parent module.\n\n```js\nimport path from 'node:path';\nimport {readPackageUpSync} from 'read-package-up';\nimport parentModule from 'parent-module';\n\nconst parent = parentModule();\nif (parent) {\n\tconsole.log(readPackageUpSync({cwd: path.dirname(parent)}).pkg);\n\t//=> {name: 'chalk', version: '1.0.0', …}\n}\n```\n","readmeFilename":"readme.md","users":{"nraibaud":true,"flumpus-dev":true}}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/acampkin95/MCPCentralManager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server