{"_id":"filedirname","_rev":"81-edd913acdfdca5d689b8a4bf9343705e","name":"filedirname","dist-tags":{"latest":"3.4.0","next":"3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565"},"versions":{"1.0.0":{"name":"filedirname","version":"1.0.0","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.9.1","@typescript-eslint/parser":"^3.9.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.2","prettier":"^2.0.5","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.18.0","typescript":"^3.9.7","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[],"gitHead":"352dd87c83812e8b39f571634d63b7c973fd171b","_id":"filedirname@1.0.0","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-rPMoVJPi9KqhXZ73hRZPF6Gs4oVYawOE2yqDZCEr8lxyWoQPGJMRfBo0dJQg4KvuPtwbA59s48MOk4eTPP1WzA==","shasum":"9b97b84a32acffd60a7cbffa04402770942fca00","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.0.tgz","fileCount":12,"unpackedSize":19333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOxWkCRA9TVsSAnZWagAA/dgQAJgmdidB+Mc4krnC5ILp\nSu5VrFm74c4sKbv2qtWeU6Em4shoRTziqSPhDdLiqWIrUz57XEWPHfRwXKVI\nkJGL2Bs+MnQbV3KvRTUXpOpHhFXVzlMsxJKWsmIkgjOXgmxVSpXnEenoB2AG\nHumONtvHex01V0GoyKJEfTlrstkPLTkRROUnShbtKpRfrZU2HZHdo6GXosMB\nrIt1YP1rObXg/z5FGV3eWz7Pq7and/zSWspW4GV3tju1m6WZdmvN5PvuY5Uu\nuLcINPEwLL5V53MaTG/a50t8VfqNBUl42BFbDo1oN2shLL6rO2rSWiKAye25\n0g0IzoLBvcl7/TXPwtr3r07uCZpszs7PKs07QjGHHHGNKzbS1Xl1PniWUSAz\nZLpthJ9YUmi+EBdAkiISR6vsu+HlVsWymdZlhyEt4himZTnFcm/wdxtYf1hS\nHHT78mwazX+BND8Yu4zMz2GO4KozndOL2QdoOrNAw71Rewj5vh7isFPw/BG4\nP6laFw5jtfOvWqm7T00MVN21Wo8F04eSU21IlzwB5HYYlowtIGHTmmWPJsJL\nh3A9Lq1G1BNWGCy5/BZfcswIBkC9+SatsU/6Ul7h1V0wkJJMl1Le5yNPLGvJ\n7t1wihGde7cXqzn5RugppfV+hcSp95Txuv4hpSA1CTLxsQRUiZMPvIsiKd0z\nicmx\r\n=bF8J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNWvuVO1SHgMQPL3a4nukfU+fZGP/+YcD82OdzF9Jc7AiBgwKrj4u8BMlLdHNW0U0JOvwpZQ12vI0kqjMS5tx0IqQ=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.0_1597707684067_0.47834294980501024"},"_hasShrinkwrap":false},"1.0.0-next.1597707739.352dd87c83812e8b39f571634d63b7c973fd171b":{"name":"filedirname","version":"1.0.0-next.1597707739.352dd87c83812e8b39f571634d63b7c973fd171b","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.9.1","@typescript-eslint/parser":"^3.9.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.2","prettier":"^2.0.5","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.18.0","typescript":"^3.9.7","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[],"gitHead":"352dd87c83812e8b39f571634d63b7c973fd171b","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nPonyfill for __filename and __dirname in ESM environments (Deno, .mjs)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Deno\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n### Node.js\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^1.0.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-node-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://github.com/balupton\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nNo contributors yet! Will you be the first?\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://github.com/balupton\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@1.0.0-next.1597707739.352dd87c83812e8b39f571634d63b7c973fd171b","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-w02oopwQ06sBb9ky35SEMIrjkUv6FUov4NPfubEOsK4OQ3zJK9/fnGIMevyLb/mZn2UyWj4RaIBXap4Zqsbh0Q==","shasum":"3ff49cc948e902de99bcbf52983586770e228f05","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.0-next.1597707739.352dd87c83812e8b39f571634d63b7c973fd171b.tgz","fileCount":12,"unpackedSize":19390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOxXdCRA9TVsSAnZWagAA9mQQAKEDb+UkWTJniP0LbSe9\nykO3iIadBLdWWzKJAAXm+ZG74hiYhUC/2Zx2II1McBRUoPl5ijkq86BgmXG5\nOC4z1Xh261kHPuoyaVyYtns45ZXhGPQ+6w+tc1WM5waGnhIgKySI8g9UyYEs\nFEQh8IEHbt7m5HjAP5dA9LXDdG3pMPZ8iBpZseRaanOhg7Lipw+39qp4ZHGZ\nRUS9fWE/Eqsct7ZFop3LvtoDufNFk9rqjvgLDnHtlqLVH/s8L/ioM7KEFyO+\nGP/2f9eaMcWvPIGrihIiX8G8Yz+AcTvC0xNExkRYzBQFwllcld3ahqLg1XzC\nzrMHHRuDqn5FFff6si3FnfRhO47CTdKxpspp3A88R5X70G0RFM8KNsPj3Pei\n0lteX4aWqRYLX8EF8pq9y4iT1mWDxe0n97rjdfybDEibXzhREzuDjRiZcstU\njWHdyQVejPakJx8jR1nlPWNW3Y2MqsGE9Qbh3Wffm5wYUejE1UqzfG0L5PTi\nQMRdny/6Ew01Dynqo20erHHHaTBofQbWtPuVeK8GsdgslAMYFZq1qEXYvY8H\nmRxKo1GiCCRPO3oopwv3UU1qRNAYWaQC194gD1UKsX3wdf2Jp4fj2IBlONl+\neX8ircNJ03bTA+csTpQb8aPS19YBt9stOcZXqg4s+NJbn7fqllhl6FpU+Wfn\nO7Fq\r\n=OZ3f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDt2zx+/3DeFP1XGk0CHdxtsxRYCAxihkUXMQaPky0ShQIgH2sUJ64rh8IdF43c3CCZzUSqRHlYWH+pYTyoHMpPiAc="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.0-next.1597707739.352dd87c83812e8b39f571634d63b7c973fd171b_1597707740889_0.3859928233496972"},"_hasShrinkwrap":false},"1.0.1-next.1597710871.9f1f87def92801b822fd9897d05dffa51be91252":{"name":"filedirname","version":"1.0.1-next.1597710871.9f1f87def92801b822fd9897d05dffa51be91252","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.9.1","@typescript-eslint/parser":"^3.9.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.2","prettier":"^2.0.5","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.18.0","typescript":"^3.9.7","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"gitHead":"9f1f87def92801b822fd9897d05dffa51be91252","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nPonyfill for __filename and __dirname in ESM environments (Deno, .mjs)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Deno\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n### Node.js\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^1.0.1/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-node-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@1.0.1-next.1597710871.9f1f87def92801b822fd9897d05dffa51be91252","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-XmwRymegrKxSVW2JUs4FfwrFlq6KNznY8psNbnl2nqxfSpJj855KWHMFO18ZI0lqHdzp/tnPTQcZins4QV0QXg==","shasum":"dc5f46890185dba80dd41d5a09975aa740c4421f","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.1-next.1597710871.9f1f87def92801b822fd9897d05dffa51be91252.tgz","fileCount":12,"unpackedSize":19964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOyIZCRA9TVsSAnZWagAANngQAJ97vWT6q1dH5OgzLrA8\nZwyA66a6DHyIvHdmCpOvVes0pF+k/YWTkjYMfl4Ud/t3Ejdey298cZwrrdFL\navbpwyvDzvBjpwd1jlkokaieClJ98YT+WokFP+gCr9Rz8uNk6JPIXr7/J0ds\nZkh/kV+FuIhHUHehfU+94BnEiYcaaRe85IhmMi1qhciA9bF3J5QCBt50yy8t\nBydfsNbkFs4ekdbxqw+ITb9idNw3WIasYFU6NFn/pxH/hMqzdMSyYIwNT54f\njB/xFvIJzgbLzYUBFVQwHTkAlC3s3usqTFMeDB/KXADB5cdpm/5VvD0TNYzJ\ndHP3paoMbcIu5gN/xi46mhV+rVK2+cX2hxC961zR2GZVVpLaB4yZTnUX1zWc\nE1NbQNYHMJav43nUV4YGOSFZ/kd2FJUR0h8S8loljN4o4bGJ5nHHMkrqrVmv\n48Q/CyYPMTNhEdi21afALU+6tXhc/6lTaqrvI4uIrOBslyd571d2/rODVJUE\n0H6AAosEKUwhB+yDQS89pysg7MstBCsp2urKzm0/Fypvbf7cHZm2F9CJXpQT\nBEus+3LoIijVhAeos+OZnuE5CjNCHsJ9grL9L+3loGJTt1NiDtPdc98XuPiI\nA31+yVZqAarvL/3eyyGRbO6BlrKia0pAkILyQIiWhdGyWHJD+ugBaps5or2b\ndNDt\r\n=Gq/K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIzwRIT2CqWXZbikIr1YgAm0T/HCq1KRNKV+G2Z7FiWwIgBLetqnFXxvEYz5JUX/OR5HFdZBWkccnBQOe5GKsVKlw="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.1-next.1597710871.9f1f87def92801b822fd9897d05dffa51be91252_1597710872894_0.39414550320609276"},"_hasShrinkwrap":false},"1.0.1":{"name":"filedirname","version":"1.0.1","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.9.1","@typescript-eslint/parser":"^3.9.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.2","prettier":"^2.0.5","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.18.0","typescript":"^3.9.7","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"gitHead":"9f1f87def92801b822fd9897d05dffa51be91252","_id":"filedirname@1.0.1","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-yzNTVw7UOhRc4DUzc0OR7os8p9+Jq2/Kea6LW06CvlsdZ+7ec1QkaxPEXazs5cPYrrNouJ6dpC3vDEPYEuSAyA==","shasum":"83e87bd4600e0ca3015715df5038a930f96e0e70","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.1.tgz","fileCount":12,"unpackedSize":19907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOyJjCRA9TVsSAnZWagAAHwsP/j6m0caxahykAcrLwzZZ\nG0UwDWAmObyDU22znL2bfDEbHCTNsNBWIxc6BA6xzrpy+30QPtW8UnK8HXxC\nlaPCcUGz0WEoKMcpoXlM2O+Sdu1p7aRjsParcBeoBnZRUJKBiLTEhuqeLtiI\nNJL56WqiZ/vxQs6a5GWfdTnVXybAr3jEQ4kUGzYugnIxYtschECimWPVeB5x\nYgDdUACOKlCPR21P/z+yXeBP4eeCoG57voHLRMXrcKhEVp+a72fnyzdqwpoE\ndq7Dpg5beGVQDXZg4G0iUUpGzIp0QpNDHvSypeEiYbKhtHcik/HGcQ4WRUMn\nR4AS9GhXuK2kPVHHvSnzdY0kb2MoAF86fKpfXKPmi5FfNcyx9MYJoDTPoPBp\nfCUolTezZRZ4pwhOnSEi9Wa44RT0ZYTqkSv1QpeOIn/hmZL0bwww7d9qVhIm\nAKemDCpahMVDZ7kSP8rOgOGYDIn04jzS4x0m72c8Yld0V/BhJTGPoVitb5Qs\nUaUxx6h8l/AZgb3WU2wJ8qILdsTuFpKIEPWm0mHFld/Fd1YKiZzz1/h+LHR/\nSJ6GS9UO7psJLzMqdIRXD1nzAKAZhdHFZ5FaZQ6roWXq5jFp5Eb5J3DndnFY\nzdjiImnFTNI7EpEEu3USbE2d9CAgsF8LDsHkd9cHBslVjEL0ag7U8aBI9avS\nDjuJ\r\n=xiU5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDjJ99EOWXPvYunIJPYeVGzuR1ckRMGsfV2o+NSWaLPAiAy2bO+Z9Yfylklug4ruHeZsATtnxS12hFb6zTtAsaOLA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.1_1597710946655_0.6759747640752272"},"_hasShrinkwrap":false},"1.0.1-next.1597778116.838dd390e235d60a29f21009433b483fba9de92d":{"name":"filedirname","version":"1.0.1-next.1597778116.838dd390e235d60a29f21009433b483fba9de92d","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.9.1","@typescript-eslint/parser":"^3.9.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.2","prettier":"^2.0.5","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.18.0","typescript":"^3.9.7","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"boundation":{"desiredNodeVersion":14,"desiredNodeOnly":true},"gitHead":"838dd390e235d60a29f21009433b483fba9de92d","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nPonyfill for __filename and __dirname in ESM environments (Deno, .mjs)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Deno\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n### Node.js\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^1.0.1/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-node-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@1.0.1-next.1597778116.838dd390e235d60a29f21009433b483fba9de92d","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-0YVH/WcylEqWAwKvYLEHn36yp2CDxisQly4HgnOmm509nC7rJhTY6xfI3vSChKaYheeADvmxggJ8Wi25Zbq/Ww==","shasum":"e2c0a4dd185f63c344304b9157c6061779da3808","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.1-next.1597778116.838dd390e235d60a29f21009433b483fba9de92d.tgz","fileCount":12,"unpackedSize":20045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPCjGCRA9TVsSAnZWagAApwEQAJEEWeRpWGa0fFaRlxu/\nlDOCG7PFFTvTi3oTHWEbj38uVPiOWACUaAj23NfCbpVmKiHXo6fNPLifuT6l\n9ke/BvJpR3VtyO2px3VP23LpOIP5BtgZZ5zEdj+vUyhctF031AaxWqks7o6q\nSIybCYsem1vJKztxWcpgpqnxOezRwx4/R36zws66nz8qCAPalr04tSNhFO9K\ndO3Lg4i4M1T/pDqvOIYP5vO9szaAHGZn4oFJP/Z6LujdMaGeDlhfMQW5y4Vk\n9oi3PcO6liN7eGyLTZ9HsTQ17TKKp4td9c1NJxPaM/8IWdkmCYEbacnIjEuN\nJNH8LWHteb/dppUZotPllq71bUzoMVRwfgkOxNRBshA6baLgbaoS+lZg4JJe\nKDyro3iEzhIypXG3WjOCftLrdJTUBxPTJ7BKBxILpC1W24bH7/o2XzhtObEb\nT80C8AE9UEq4epvQrQV5aZwL8W/RsgczVHVGF2GCv63a3XLS31Yz6DrX3sME\nwJnO+r1r7hDehOeBOCdLDtoMlOUMPUUd3ChcdlWP0VowaeZTQpB//q60n27U\nHRe74+DVri2kBe8unw0FB2DdcWAgYPubqgigcMuU6ORtHTvHagJdifD8/0x+\nzEKEWc9DY3oG6vQkg9wBtU/HJ4eqB4cq/Hac/lvTWk7tAQBPFUbYKyZTgyUr\n+dPB\r\n=qi4J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGp9GIeMuUMCVopUdCn9JvjJlMGhHZVCfPcMIDkPj1kkAiBroCw4eXAbyvDKK3majkSvLdjV4V+3hGyEb6DQzjnDag=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.1-next.1597778116.838dd390e235d60a29f21009433b483fba9de92d_1597778118035_0.7788096827766635"},"_hasShrinkwrap":false},"1.0.2-next.1598842815.65805c4f67ab124ea008b818e5aaa853e34e06e2":{"name":"filedirname","version":"1.0.2-next.1598842815.65805c4f67ab124ea008b818e5aaa853e34e06e2","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.10.1","@typescript-eslint/parser":"^3.10.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.3","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"boundation":{"desiredNodeVersion":14,"desiredNodeOnly":true},"gitHead":"65805c4f67ab124ea008b818e5aaa853e34e06e2","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nPonyfill for __filename and __dirname in ESM environments (Deno, .mjs)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Deno\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n### Node.js\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^1.0.2/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-node-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@1.0.2-next.1598842815.65805c4f67ab124ea008b818e5aaa853e34e06e2","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Gue9nDVVRYQ2pIpIqIhR9wu4AAxeR3rpsym6MOYAVAingF+G7GWe11bHEI/6JsuPd7zaTjFvDSdAiVuEiMMoJw==","shasum":"8b7c78b330a8fe1f5c4e6586916ba06454330461","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.2-next.1598842815.65805c4f67ab124ea008b818e5aaa853e34e06e2.tgz","fileCount":12,"unpackedSize":20337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTGfACRA9TVsSAnZWagAAvtkP/0Ie4AUpmbgo6CO5YPaP\nzPERQuT5ylCcLvw7PWEo3wl+/8kEjo/vD0BUvcRAjJ1FdMOReYsYIe6ftLlL\n9YsCMBNpQFbo6br8mbmHAQ2ShuHokEDM9bAXZrvxxSSg/a78mmqR5/fqmcQp\n6Y7tAp3KbsOP3HHbXeq5t/iDbpxLvCTH2J3nlWQX50WZW+97QpRLxaQWoCmV\nAm/uUpMAnKPUkIBlVHIpmqmjOrKtRWB687NEGCmu4Dnw55/AIy3RxQ/+PxDv\nI44+ca9Gd7EYFEmo2EKS1i2my5xuLs1b51OlZ6mSTXqyKYOuC44zNJNLA3HU\nWGocT+0qM/1HhixCec/D8p1OB7E3v3Y7ri9iU6xdw0ESp+ADm0mf58FDwl8x\nMQ9S551oViwj7yse+9TDMWpE4dqa2UNvbu9vJ4u0+FC5VUmqHA8mdawxwkLz\nCNMr9pSG9lcxcc6GQRcdYp6wbgAC+7pdmYqpbOaB07lYCC32pPJ78Bwo04Ja\nGhQWgAL/QjbAQMo/wnLJIpIwo2KdLJQyPpv4cFWbt6agtidtMjuef3yxGipZ\nLwd7qfSaqoQ0ByGeskbcDJgKkxsEzLlYl541mtzfcuaAwnClbY+CCgPligc+\nmYH/gEw8XBEm/WjHeNH5c0DL1SpImwBo8cGqYVqVwSj2FGEPRSIweB2h33HT\nIOxd\r\n=Ajpp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDEghRFr1fB3VcdPb/MA5kSj4IB7BNJM6O9Lo38R4lfAiEA7JV/v00MtpkAsuYuDCU8g5gqTaP025TywQee50jvPJw="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.2-next.1598842815.65805c4f67ab124ea008b818e5aaa853e34e06e2_1598842816306_0.848936304217526"},"_hasShrinkwrap":false},"1.0.2":{"name":"filedirname","version":"1.0.2","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.10.1","@typescript-eslint/parser":"^3.10.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.3","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"boundation":{"desiredNodeVersion":14,"desiredNodeOnly":true},"gitHead":"65805c4f67ab124ea008b818e5aaa853e34e06e2","_id":"filedirname@1.0.2","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-CFrsuCzJL1gp/AbDg50X35ZWckdfNIqRP5vb2Bf4bUJcskKecYrmkwYDCCDCrPXt1JR5CkeAHJF+0uPfnsiPaA==","shasum":"26d8ea08ff5de8e0eac482d0096ec4e03436bc3f","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.2.tgz","fileCount":12,"unpackedSize":20280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTGfNCRA9TVsSAnZWagAA6u8P/jcRLIBmtVhz0/fKM+C3\ndU82tI6pPfBFjq/ZlzbpuHHj2FsZByWgRwG162A11e9koWZP2T/aB7jYtEXC\nk/zb+PbfE1YoGWoTcdi4wbcv7OJPDH0+rWVbjrrBeohQjCj1VjxvkBsFv0lJ\nmk20rQ2NgIN/88+YblahyWykY+K9etTkOtEZavHd3BCaCjYJTbRjJHR0mZ4F\nJWfnLpDqNk60ICW7zwGUXpMPPRoMkShzSRBj4WTZAMuEr5GFxGowfRaP4Ox3\nHFUJYjpsQ9KXXkFHnUNRCiwl1lmTrhuU9+hDPKEsV+hE40eRNtdR7RGsLelG\nJQDLamQbq3ZtgV5do6dmY3pYfMzwTal8OgteIzTtQXGSdvYO5Wb0C/A9s1oo\nQXYh/FpQnR1HtteJpQ4pNa05czaqDog8xBvZrLWzZAfnLqbIdWFIey7X0jcc\nulkfpfJhSV7POoEHce1GS1LvLUhitLLt/FvN1/YdiZfH//KnTSRzZLYdOloI\nUsyd8QOKI81Ilq8nUjpH2bujjOo3ACNunGb6GT2BoRtzsUe+7muXsGJ/SacI\nPdZoUMWXxrbNAtmFBoVNAmkRhIsFgq1mvr+mbiRahJ4WzBu9n35TJ9jGiEUN\nHa93CDWoAqQ+MkK05DHktRGhtD3jbk0Q5nAL9bcRsA5hHrOVwvjWwvNFEW9B\n4agE\r\n=4kIo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNd3W16KUlKwrTzGI7mXiwZguNFQMABcucUAIMzQE3LgIgccalzVLjlwYxtDI8SeRHgCXz+Wlybh/RU5QaFJtcQNk="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.2_1598842829361_0.5936044807478247"},"_hasShrinkwrap":false},"1.0.2-next.1599077121.ef0c1a77ba07a0538d656bf31e095128003fc043":{"name":"filedirname","version":"1.0.2-next.1599077121.ef0c1a77ba07a0538d656bf31e095128003fc043","description":"Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","deno","deno-edition","deno-entry","denoland","dirname","ecmascript","esm","export-default","filename","import","mjs","node","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"./edition-node-esm/index.js","exports":{"node":{"import":"./edition-node-esm/index.js"}},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^3.10.1","@typescript-eslint/parser":"^3.10.1","assert-helpers":"^7.0.1","eslint":"^7.7.0","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.3","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.1.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-node-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"deno":"edition-deno/index.ts","contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"boundation":{"desiredNodeVersion":14,"desiredNodeOnly":true},"gitHead":"ef0c1a77ba07a0538d656bf31e095128003fc043","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nPonyfill for __filename and __dirname in ESM environments (Deno, .mjs)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Deno\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n### Node.js\n\n```javascript\nimport filedirname from 'https://unpkg.com/filedirname'\nconst { __filename, __dirname } = filedirname(import.meta.url)\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^1.0.2/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-node-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@1.0.2-next.1599077121.ef0c1a77ba07a0538d656bf31e095128003fc043","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-QxehYOgp/PTbGStdkKuEBvHIivjXiZaYcnS1eydl8I2XK4tXxi9Bn0bHqPBTddJNmo6de4qDLgxTN+5iooce+w==","shasum":"93916337fc92e3f4e6dbd2a3a164b52f27d21e96","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-1.0.2-next.1599077121.ef0c1a77ba07a0538d656bf31e095128003fc043.tgz","fileCount":12,"unpackedSize":20337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT/sECRA9TVsSAnZWagAAJWIP/1YNzR1p2xxN1+1dIpbR\n8J5QbHY/eFI45uM/AHtTuzLiAa4iHz/8ebT0Di3mKCle1vteqLPSSiW1+ING\nvAgbrrZsvBnouLH8A6bzVXL8cP5AZEfefQuDlPCbbfpooB9SZ6621U54hdB6\n7UVgvU2xboDA49Bh6iqwABnST8JRG2FkrghIiqqRa/VSF23Slo2OxCWfuXOO\n5j2Zi5UAykiMfGrOVZcKtCBOOOU5M8vyh1rHTtLtAXRurB09VubTJ9nRwGyt\n2Ck+Yku10I9rehcNPPbZs3GdcZeiudoLcka5GZAsFP+pzPW9mD2grecZam+R\nhtxG8JS6ly3wszDqtKgNJDAlvBVqnpqcyDYFY2DJU8t1YXIkZNDoXZqT46uT\nomJF3deR8BGYBvUEZlc4u5XNYbrOR0ZVehPWt2fSj63qErjMh1JvLCRhJgm2\ncaCl/GLv80RLPPpqtEXPAgjcbcrr8LOGovJL+gI99HDsSh1bUXzg7K9hFSod\n1JasrcG1sfdmb2NEXsfi0zBntRvb+jjsqk2bxTpGM7Xxt0EBrgxVufn7+I0M\nWUR43GIOUCQXsr90glkDiBIoY35xTp4KmmU0ZGdXw/uHBqN8obj2G2rydT9a\n8KCssmMlDs7/Xsf716Px3zW5wju7sVusJI+QEgte53YX591b0/wpzKm9IRad\n5wr3\r\n=TTYX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7oZycDbmx7wPNx56haks5H6zEuuKlNkYKKlacN5YBlAIhAJft6cAm9Iig4m3Ual9X2bzO1gH4KOW6q14NHf3tygrj"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_1.0.2-next.1599077121.ef0c1a77ba07a0538d656bf31e095128003fc043_1599077122901_0.15754611065889845"},"_hasShrinkwrap":false},"2.0.0-next.1599104301.8fbc343544a299a05312d2042ee708297307a6bd":{"name":"filedirname","version":"2.0.0-next.1599104301.8fbc343544a299a05312d2042ee708297307a6bd","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["javascript","esnext","require"],"engines":{"node":"14"}},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-node-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.0.1","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.3","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"boundation":{"targetModules":["import"]},"gitHead":"8fbc343544a299a05312d2042ee708297307a6bd","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.0.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-node-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.0.0-next.1599104301.8fbc343544a299a05312d2042ee708297307a6bd","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-HH+6E429sPzvVRJkYDE1aj/j66yBzzYUiyAX3JYGGQeaN53Dc4W93DS/Ha4dqqLsdvRtVlsR//EveONcrsOBMg==","shasum":"06db0edda881e6494b605d5adb3afba0d895925b","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.0.0-next.1599104301.8fbc343544a299a05312d2042ee708297307a6bd.tgz","fileCount":14,"unpackedSize":31012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUGUvCRA9TVsSAnZWagAABXUP/1pvbkhoqDFt5MmUx/1U\nTosJCy/uPHIp7e3ivAYSZVAdvr2XDei5f1cJysg57uzlFWxfAlxjNSmhu8W8\nANarMyCiGVDUYu9cszvsWL+O3r4TkbzorXJ+TVCMAiYZwVHask3VEmwueDXr\nyXf1zZ+4RVryIc2Lnd1fX15TbzfoP6vtLNfrYZzwdkAGlpl9BK7cAu2ofEQh\nZ5gDzRG7lVYkF05Id3XhitrtfyImiYaPyYhPROVbOJcbQp8RSFBVuEvcW1kE\nW2KFOngqc0LZXR6Mv0wVKZnM9VD7ky3Ec5GKsFJUxdqhVjfLFDjDTC9eoBy1\ncFffAhtvy4acqWxRo36vHOUd/2+QwmNzIE/65p/89CFC2a21g92xDw9rxgvB\nWHe0BlgbB+fbUIcNGUIJ/hU43HGMk8+BxTe3SDaF3Ygd3ExGTMjybYccbhnK\nFOVjWkCHcG1sic1DzAQ04N6BhLzNEA9t/lYFsF19FPLWc6+aeSfSRIsXhvEZ\nnJD75iDY0GS2EOC70xFXPVYLg7axiO1OmyaLHI2APtdczI4t2sdwGdiUfQQE\nTnAgegWTpI15uKdIsX2Gjx2pcgXknCvPzDiHNa/0GKeznJ6RMzcfl11LB1lz\nj+9KthDvzt3QKgyCDcWjssDi5nLdGggl9a9PdVzKO+0jFVaC7aUP4jpSNu16\n1uvb\r\n=1Xyv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBn6LQYPf6jFYwT+CAiL5vOVO6Hp5l/bxfCarwWU69fxAiACW2nkBhAAIsUproPtcAf2aldx5twgUKJBfjmLz0+1aA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.0.0-next.1599104301.8fbc343544a299a05312d2042ee708297307a6bd_1599104302599_0.2942416005950035"},"_hasShrinkwrap":false},"2.0.0":{"name":"filedirname","version":"2.0.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["javascript","esnext","require"],"engines":{"node":"14"}},{"description":"TypeScript compiled against ESNext for Node.js with Import for modules","directory":"edition-node-esm","entry":"index.js","tags":["javascript","import"],"engines":{"node":true,"browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-node-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.0.1","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.0.3","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-node-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-node-esm":"tsc --module ESNext --target ESNext --outDir ./edition-node-esm --project tsconfig.json && ( test ! -d edition-node-esm/source || ( mv edition-node-esm/source edition-temp && rm -Rf edition-node-esm && mv edition-temp edition-node-esm ) ) && echo '{\"type\": \"module\"}' > edition-node-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"boundation":{"targetModules":["import"]},"gitHead":"8fbc343544a299a05312d2042ee708297307a6bd","_id":"filedirname@2.0.0","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-w7FIo1Oi9GohDyZ1orGXu1BLt1zRckHepj0VAXtlCJ5Y5D9P06Wj2qTxsqgm/ek39BeLG6f90t0u8/iyPVj6lA==","shasum":"7e1949058a8f6c01b523320d4be54bc6fb6d3ae7","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.0.0.tgz","fileCount":14,"unpackedSize":30955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUGU/CRA9TVsSAnZWagAATKEP/jKCrWDXTegIundVYliy\n2Rbm+8nmsFxnRXmZK6Sr70G88tqSAOSc6Zx8MqJJqtIA3ZGaKpQurQdM+dWn\niB2zUW35pJF+wGu8OKqGhsl0AvI5M8cMv8+qvjd365wmYkxB6wWKstSWhAPp\nMPWlMbPiQ2XnpF5EZHg0l1ipJcNXc3EuxZ9OANyACN/SyyAvh+h/2hKSZ6Gu\nSRSvfd9gj9RbeZaEukDUkCiQUlsyE8Z/VgRVBPqXWhiTKmQRyYck0rDJMCdX\nqA6YjK2QdvmTB0+yD9aLXG06e+SXCbstECANJxquNFfF3NbvlMpIYfxtNSrm\nB+ODetKcpI02ujt5Fy7+UoqG44S9klcQCwXJcLGjY3JJx0gNYyIi3gOrlFI9\nnlAeZ7TpDlofX8G/xJ78Gf8l8yIPXO2zrhkSrxw3T/Gf2n+/krYNP8yGDZkq\neg78N6Ng4aW9sqGfW7s6ssZ80vLnSNui/UElrVFb0xPy3kBjnvKAfmgEaM/j\n1+2YUBzX5HpAANDrfyjVjB/d2BCxALtYdXqsF9rOWORx8mr4ZweC74We+dz0\n058cq5z9p4fXwJhWmW18KdeEkOcySTJZ5gpPcspkL/O3JTJ9rvwx+T/0/pZb\nRwfuIFbtDRWg4RmLUJjQbIJbu5/ARZW01kLmkg3gY1H8AmFt45K2FMQcoGuD\n7J/k\r\n=WgMl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCW3YHlRR8+VHPKMuRpf2c4/zxX8FVtRCjaZ6mfk4of4wIhAJ7oarFJyLoOfulsV3YHehaG2tRd0tfA7FzkiWWINFPO"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.0.0_1599104319074_0.9906842320564286"},"_hasShrinkwrap":false},"2.1.0-next.1599189896.2cd6ab6c76a0db46cd6374b7233542e94db41d3d":{"name":"filedirname","version":"2.1.0-next.1599189896.2cd6ab6c76a0db46cd6374b7233542e94db41d3d","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["javascript","esnext","import"],"engines":{"node":"14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext-esm/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.1.0","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.0","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"boundation":{"targetModules":["import"]},"gitHead":"2cd6ab6c76a0db46cd6374b7233542e94db41d3d","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.1.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext-esm/index.js</code></li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.1.0-next.1599189896.2cd6ab6c76a0db46cd6374b7233542e94db41d3d","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-r8dNcdpVMk22KsV2DUs3FgiA6q2H77UnIsc1U+3blIowZCG8RU9Of0hQ3rV4JlkJIZAMD93dy770udnSu7S+jg==","shasum":"40a7e866c2485e2b47cdeb5ca7c8a5106ce99468","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.1.0-next.1599189896.2cd6ab6c76a0db46cd6374b7233542e94db41d3d.tgz","fileCount":12,"unpackedSize":27467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUbOKCRA9TVsSAnZWagAAHQUP/0eFIasePt3QzmfQ6vZT\nRkTvrqOV1IxFIN/ESeYUyCwKhG4pBbOyX49rMLuxFdDLvI1am28FFOLQ2HJ0\nG5OAq3syi5/tXi2aztmLcLSYfoC9idY1hn3fpuWBQOc3SO6PWdYGqtifrPN+\nfmg2RH46G8o01POzyr6ZLz9s5YoIWPygq25gC3owiKmeGEzhS9VgkFvsPrM9\nF8GwdmHL3sRD+U8wKjek279YA80xDRz+qcW/FrXJaHjxOlCXA54TMj6GMUk1\nR9s4vuksMr1OHK3OBzba+27R3R2o4cClLL7abW6UhHJChAFeT0YuTvRxRITL\nhIStoJ9n1KInbdgK64xe3JZ7nPgc1mgoKulYAkiJXMkPrq5oNnNHrlDJNUhG\nQ9rCZKCIeJH4THHyznoBmkIqu5M2uw5tCPhE4eGtODepln7Em0OPanGgwJHC\nXQq40pbJh7O0hX7v3YylsAEutxQ3cyAy20AGunPodHPmnIpkJKjhYLib/d4v\nkvG5ZEbu9Mdv1Q6N6z7VdjwEUb4SUX8dYSApPeYarQCGyVfLTYJy/RxYykWB\nCaBrzf7dgkXa91oRL5il3qscZzEpGIEPwOVpQxZ6DQT6APjHXn4Bh8xykVXm\n2otiMOV5R5+xm7ZV/CtvmAds+9NCMg3pwn2/e+yiwzmFvUtr43+muniJN9t/\nlrYa\r\n=Gdz8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMjhiY/bBFOv6L9+5JAM11/y8smO42bLf7QGrUqDFZFQIgYhMjNcanTo2rq/oNn5ELsEf2USzOnplUaBEXxfuP6nE="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.1.0-next.1599189896.2cd6ab6c76a0db46cd6374b7233542e94db41d3d_1599189897533_0.9409273410305141"},"_hasShrinkwrap":false},"2.1.0":{"name":"filedirname","version":"2.1.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=14"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["javascript","esnext","import"],"engines":{"node":"14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext-esm/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.1.0","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.0","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext-esm/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"boundation":{"targetModules":["import"]},"gitHead":"2cd6ab6c76a0db46cd6374b7233542e94db41d3d","_id":"filedirname@2.1.0","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-6MdAh8ohxRtOYYqZMoUoPLplJ2GNNe1KvNMLmjhwT9wj1fPGkWZxGcm+W7cl925LTuzqaTxb/CP+3CnUwb4T+w==","shasum":"fc776b2cf94eaa1c0a612491d0481b346ad640f5","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.1.0.tgz","fileCount":12,"unpackedSize":27410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUbOWCRA9TVsSAnZWagAAkmQQAJNGhhzVYmAoxnlH9E7f\n/dTpUKAuJsJfHj8EOpVu3K3WuRILYCuuQze10RfwKsHjhCbQQ/GybPyaN/j9\nnSRYZWyyarzmTvCgRBTiu6ERyd5hCwtDPHpFTko5baN+HpfFdMmabAAZNpSH\n7T2wryOwil2AvOBm/vOLwhgHAVJcUlCx3yjHtOc9GkeDfnZ6rSzuQCIZXBYb\n34XqHQn76X3YUDkGhJpOamW0zN6vxRaRGz+EdvyPw7cGA7FI6Np/9kCsfhJh\nzeVsxfFnZF20U+4qAvazGnbk2Mcwh4mwl2qA2dzwzgJuqBNDgXdaYnOwJVdX\nUVKxnAU5uq/ieZCwrCzMKx/8erY5eRrSByLQAjwNNYt6MZPgTq17v9TsG0Va\nUJf/DoqZbWf4TC6UtewHpZyHoqVDEa3zqOr1ioOmeRxpWnqmcOzXiQH7cuPF\n0/8j06aYhPmqUtBBHsa5gPIFSBRQtV+VBQsI3YfrwrdOEOI7jev/sFhw1Qqj\n3qgi4QW1vKCGMm6vxE8wZ/yW6yTihfIbOlth6KqVlZGCqUOprI+6jtJgcMnK\nnWpMG0DBeKjmkBDzQxwPSSXJT23a14Ybin31h4XgIRBWFA+NSgUas61L4DmT\n4lkI4kYLvLYq9UkMDLadzYlW1LakfYbFsg5dSpPawGpGRATKe6Ub3g/zBxOQ\nh+FP\r\n=sN2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxUXw9S9wMEAWmA/c6KSlZIX1LCd27eQ10SpVikRhBBAiAxgeJL9+Hur/VjRqwu4m2oP+tejfLfHhkdGgJ+h5hSCg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.1.0_1599189910130_0.9374384171085808"},"_hasShrinkwrap":false},"2.2.0-next.1599190318.e41c89014ade8980957e1f9ab4a55ac24afc8e83":{"name":"filedirname","version":"2.2.0-next.1599190318.e41c89014ade8980957e1f9ab4a55ac24afc8e83","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.1.0","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.0","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"e41c89014ade8980957e1f9ab4a55ac24afc8e83","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.2.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.2.0-next.1599190318.e41c89014ade8980957e1f9ab4a55ac24afc8e83","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-tIX1Py9j/gf7mD24VSHHSEF6hCZFEBDIAdpz5DGY/BaOvrEwH+lWjt/vzr75XpA7CpZpU1WqElD7jTsZpex38A==","shasum":"f1921c523395fd150356943ad94b8042b2bbd55e","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.2.0-next.1599190318.e41c89014ade8980957e1f9ab4a55ac24afc8e83.tgz","fileCount":14,"unpackedSize":31648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUbUwCRA9TVsSAnZWagAA++4P/j0zqsMXgvqzboTGbmz/\nRcyECfcutJWIN2snscdHCSn1U0BsuXRKMmAwc009O+rV2N67IrO8DnMe2KP3\n6c6L0zufbPq+9EQPXtRcLKDsrb+5zdY3hn8W/UbRbv8HxYiBNkUM3Pwc2h06\nwdvhGV9HUDBtisL7RFQNpN9Ycgx1flLTrQE/AqnGdJJ8aN0dJlCPRWcK1Cur\nBD26UNjVWWw4DJ1QkVY9zdfqyKTp/KI9XnYdHk51ITGnSzNbUJSQXzj1tF4e\n26f49AQ82NkyRFxylZ+0TmV/TlHgTH3OIhBnH0m7JwNdR+gYxZBE9UHFfNjq\n2m/TtC+B+K1b1ladZpv5CHzfuKUVqEhd60FL+/Qsf0NEashqd/VtqIhAIgm+\nUMpNvcFimu5qgsMQ1efsuHPs5DPYCFAfY3tyrprfOHvzwGldPwbVlFksV9UX\nPZdfhEN3gGuEkwO4XeqW/Px3hfgpIL2RaE90uAPnxSSXvYYInR0MsHjkboI3\nf4uEM6cEhuXC3Z4tCyLkqCZfQjAFriEvzQEFUvMMQbr2XbIZNUMDqkTPHvcC\nV7VZKRniIpE6ooq09B4Rx4yPwMMxqh50P8vQGTqkTXIfeE651U+/uyRTQQ2K\nqfMI+93SNkuorZYHLxqbTaFBF4z93aj8PuQIfFQ0eRPoFspNs5Q8997TUZTL\nGPD1\r\n=WPVO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkT3rLxDjaWKpPGmgLf6XHzNRh2hQ3hTjdTlohnqBj6QIhAKG9Jzd0835mGOCvvssskkc2knk/IXgneqWYa7jwiaOS"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.2.0-next.1599190318.e41c89014ade8980957e1f9ab4a55ac24afc8e83_1599190319640_0.11039011484345962"},"_hasShrinkwrap":false},"2.2.0":{"name":"filedirname","version":"2.2.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.1.0","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.0","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"e41c89014ade8980957e1f9ab4a55ac24afc8e83","_id":"filedirname@2.2.0","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-5UCt+qdHO7egI1l46X5mAuRCHZX4a3VdHdqh3PZdjpjVNud79Zmkmw0bp1+yMBgL2XvaUSExjRpPX7+gFuU9hw==","shasum":"4d0049692fa53c9fb209e7f85b7b601bc5612aba","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.2.0.tgz","fileCount":14,"unpackedSize":31591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUbWDCRA9TVsSAnZWagAANlsP/Rwa8b+kK4Kz5OKj4yNV\niL3bRcxkFcYqaw4sJuvNuFjg2vp3Vg92bA0qwUXMyBHn6RJ3mnraePzNE/wz\ntDQgBVWlAfeJP9sdXgsw/6s6gQ44ckjg0vL5nlJM1cYijJIZISzmvsrhctXZ\n+BVfJeD+AwiLkkrs8yxi3kT6YLS0PJgyyWkNw9u5jjO3qmw9X98dmpZjr3HX\nsSR7SvgaVHZWHKP1st0Md/cgyYYgihIMg6tyhAaJTu2u2oRhrtvB9Gw22zM6\n2J6IwRewsopkIU6PrBZYUmU3YJpaLOI5lrlYpFgbmzBjBUHgdFphxFsOFn0J\nnDSmSXfSi3fsLeI3R6vFcjXGd9DClD3Eg+TaneIZzFX8bkrMAzQLDUuWj11u\nnT5WMh4YimKuq/slLI+iLnZfozfnpSRaacAmF+diQF38xkCN2OovKxtcmGBH\n1+6vUEzHbuxNk5snRXHGy4SqRRaiMXU8LeEr5N2qtn7EaPd/fFH8okNy8DRz\nP9+prsioUi1kd9RjzogDq9wnWjah1MSYW15D6CAMRa/QpbLXXgesmPyuAqkO\nBXUzFBB656D9f8h+nZSjXkgRLCblUE0EhbHlLa1wYX4kMzV2YEZOH/QIHiOO\nNRyvHsubR+iUyBQUEqWVHPX6pbYPQt0szTXoZR1gbhgJZvB6IstkrtRaom/P\nptGE\r\n=683D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrT5SHTH89bfRXB61/QIZMoOdbqLRum+dIxgYKZAI4jQIhAIipeB/P3m+qb4Xuro2k/Ji6AarYD7W22++RfBcQ5Hy9"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.2.0_1599190402849_0.7348907076781299"},"_hasShrinkwrap":false},"2.2.0-next.1599201983.e28a23c8e77f640ceff206460889328e649e5fd5":{"name":"filedirname","version":"2.2.0-next.1599201983.e28a23c8e77f640ceff206460889328e649e5fd5","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.1.0","eslint":"^7.8.1","eslint-config-bevry":"^3.19.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.0","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.2.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"e28a23c8e77f640ceff206460889328e649e5fd5","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.2.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.2.0-next.1599201983.e28a23c8e77f640ceff206460889328e649e5fd5","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-5FSpYug8LMeYD8Xefy7cZqssheEOt/1Slbte3zu7ICXA4n9mV25qahUE5dGOlgkECxnZ9BeDUruOvItZAlzMJw==","shasum":"6a016acf11148ab45898baf6109b556d4edc321d","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.2.0-next.1599201983.e28a23c8e77f640ceff206460889328e649e5fd5.tgz","fileCount":14,"unpackedSize":31648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUeLBCRA9TVsSAnZWagAAKFMQAI6DmpaISohx1vDbsCtC\nXLC8FImMEgCfIWbcsj1CyuAmr+nWn+zFm/wIRVTJ1vhqoNmtrwAIE8s9dwMI\nC0H1kR/Y7ChjjAVmGiIXyqaOx7H1YChp/k66xf3iRsYAit/tFee1B3JwPeyY\nA/gDDq5GF4CZnjPiFhSIG25tPrmD1njwPZ2jXYn9W2v4vDKH1ywohkInkjB5\nyl/HH6E4zHrvXQ6kXqlUX/ViRKGQSDmsNDndx5bVNzCrM6Axs7CK/w8pVdDe\nUYwYqK/Ce7vNdKfLxwjY4WwH7agrGib+vUe+0jbGxCJ3ZOOebOEXh1aotiiF\nu9acDBswCe6bxjaHieVx59SGzjY4oXA8xgs8DyTnYofbDP+rdAy+jQzUSBeM\nGQu/BJPvi6iHZYWBMGMhE6zgq209jiBE4hFykfTFMsrM/q19zy79FPykxoln\n+7mRBPgHx/6N88NjqC4FwYuS8ioHPLd9QFRF7HTGFSuE9PAku8ibHl1TGPoC\n45HbAH2dnC4emKg5fLb7jhH9weUxfiOieVOIKCtIavj6ataGb0LAJEC2QWhO\nv/iTYaxZ3KeqXKJpGOOTP6Ds9sHJtbVmoqPP/h2m1ZSi4K8TwD0/fcFNOFN4\nqK4kKhIbA8GHFm3VR3Uhtjc29NzBJBoQpc/akWwrkhfyNGBSxPyyMIee51zx\nBBiF\r\n=RHHZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBFq8yWeQ1FWaP188AgdGfrj3TZjJNf95Ob+H84fToxuAiAJEisaBT9VD+KvzmL661fRqotOsEfVwvkpHt0FlEwY8g=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.2.0-next.1599201983.e28a23c8e77f640ceff206460889328e649e5fd5_1599201984929_0.9108163619130829"},"_hasShrinkwrap":false},"2.3.0-next.1599214217.3aeb710ad33f10ece78cffd237f30d86765c0ba8":{"name":"filedirname","version":"2.3.0-next.1599214217.3aeb710ad33f10ece78cffd237f30d86765c0ba8","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"3aeb710ad33f10ece78cffd237f30d86765c0ba8","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599214217.3aeb710ad33f10ece78cffd237f30d86765c0ba8","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-5U9EJqE4HPI024vpFtqKTjnQTIHypJRjgUZZCaeGdeLoMkBb3fWygG1fQzHBioiJ0Ik7fq0azB8IaTsvnSYO4g==","shasum":"da4ea52627509f48cf23c058f300a08acf38f1d5","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599214217.3aeb710ad33f10ece78cffd237f30d86765c0ba8.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUhKLCRA9TVsSAnZWagAAVDUP/R2y1B74o2kn7fy9THwT\noQ5zb3e5b8NqWwLtUImK3N0Tg+9W2/N1gxh5YscgEvffboX+LUJcHpOlQhrn\ntRXkzHiBhymuXqjdSsu30qeAL4n2o0WQR6i+EnkwezNtGMarzWEl0qEAvqMy\nM7TsRiA/TX1C0LuShoviCmAZmT5diHce9IBxlXspUhtx2T6j/d+WwNNOjA4P\nSorsLxBgOMFvqy4sQPD/mDoexfkT+5vN1nA5YNeVSf+BkmTuzmN25EYqWTvL\nk+WQCKL/7qy702Qh3F1PIEr9enbRZTLBRhEE17UTUIUFeRXZanDWfLZu7O5j\nPO1/Xk4srO2QQpFdcx42HVo3LjiBVvlE7yLzj/C04Ugbs0qXp8Be7rvFUPNV\nkvzgl+UPg3WcmFu5DPwTsBfjvZ5PNphgluSZIVHvUGXcMu4fXIT1YOlg+Cbx\nJh6ng6Y69No4MXV78zQdmoVsr79BlRSJlZV9tetWPSDgwERc93Viu8PXWFck\nhoo6TttiKQd5YxLX6kK8fotcriHq+/S0QJT1Y9jA5Y4l0hVdPrEVIzDDNJuQ\nZ30VhhO98BXWHHvaQoFJ6wsPS7zQY4rdFn/KNuchisZ5T6GfvDTFoESJvTLF\nhQobL9mCbKuhUxSsU5FrVzTT5VzLZL4rA+sZ34llB5ZBd7WJSBK8r8VRZUp1\nOtA6\r\n=kMgR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0t9QTE5CUZwNPo+gzRmgL2Afqk87c/qJi17uOuALYeAiAR6fJbA9Y9aDqQh3EijCQ69F5u+ngk96ciLAyMhzYbwA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599214217.3aeb710ad33f10ece78cffd237f30d86765c0ba8_1599214219303_0.3823217684379765"},"_hasShrinkwrap":false},"2.3.0":{"name":"filedirname","version":"2.3.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"3aeb710ad33f10ece78cffd237f30d86765c0ba8","_id":"filedirname@2.3.0","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-WtRMRzoBwQsC+vk3pubrL6sofOOMoUa6h0cXgH8cPcp9zkQOA87fTvBs9ZLP1F3rCKMIOVW3kZiJyuIt96ukhw==","shasum":"00c2d3ee3325bccd962ac900d55d97179888ae05","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0.tgz","fileCount":14,"unpackedSize":31847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUhLVCRA9TVsSAnZWagAAShkQAI+WjgUpv22dHg5h2/7M\nZHg4Z2Nnxf/xmQBp4ZAR4Qh7XUqgPixcWT+6c2xuXHvWK0vmOIoH/RBa8fNT\nJMJ97xUkHZTBSIyyOIyxANJq6vHX6BnwYA9LDmnStgC51OaCpw/Y/esKq2v0\noJqvFRPhz6YbHGUVjfiD4CbLCd5Z2ioSGcUSr13T5eMPMMcmSPdG24XvQ90q\nd4nooVtYaQvRZcuN6jNzDFCxXHPVJyCAubj7vtnxI4BfNDkkF0lEAFF8/OFM\n0N6Gk2B+LWfiCkEGPaIG8LeG2NnBV26TjkUckDK7ljt3Y4/G61wBbc5kWMm1\n5gI7hVFBwsLOaAiKK1gcJET7pY92AYPKpds3V+y5trIECaM057ArykNhvNH8\nLq4xWS995T2/Xn+aP0X7iZOEH3jhpOHViNgNxZP3Cf58sXunIz2Y3//k3P8Y\n9RijGUzd8Zj6EstFY6Y8sw4GHsHpqRmOzTwikSV/TngeJ94ZtBNiTYEZKpBy\nD7Xbp0nkOCpSNEYb6QtB8D6HdVD5UpGOzMubsyG5GZu9qRYMDPB+Ma7e98SM\nLA6cKrWE++Cw93WEyr344K5Pt3eymRwzEa3h5b4iD5ojmwIDc2rTlo5+HLKr\nL3g+H8O8TFqmi8TXhk002fbSFMUkhUnOytATysF02KI1I6rgRaCYXSIgsYTE\nZO0i\r\n=sBlz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4Y3cgckiO9Yl3isMyEo6ra7liiQQDrf7QoMxfcF2F5wIhAMngZNqWf507mjpG3cFwVTKFoUzZdOWsZXFVwyRmy10Z"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0_1599214292584_0.0965650151011257"},"_hasShrinkwrap":false},"2.3.0-next.1599396631.7ade991da02ef3ca4e334f9687b50d0377622cd6":{"name":"filedirname","version":"2.3.0-next.1599396631.7ade991da02ef3ca4e334f9687b50d0377622cd6","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"7ade991da02ef3ca4e334f9687b50d0377622cd6","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599396631.7ade991da02ef3ca4e334f9687b50d0377622cd6","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-aPXhaNblHRR2MlZgPn2RPEiAGk4cGYRbbp8GaiKmziizfwG1/TdeIpClYaPGQgrMgXfon/dWoo60JkQPoHnw2g==","shasum":"7d3d98d592b3ccaaa1461c18df0a139e45ef8135","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599396631.7ade991da02ef3ca4e334f9687b50d0377622cd6.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVNsZCRA9TVsSAnZWagAABBIQAI0HqicsJdi703y6VqRr\nKJHUz9ZUvld4kCWmy7iLObyeS6vrmGChYULyNoRP9fZaOEnEstcMNqwCWJFQ\ndDc/lPFNxgUSeb3/oRS8Cw7m7eLzXJIfUrSOBMjXkTLOpfiEdAAEaBUeS84n\n/oxcgrmblPQx/EUjAXXviCbdVN2JLggEZ4B1hFdStuG1YvQu3T7bo9QE4Bbw\nyXgWVFgBgeGWFnqmplICc4aup8/9uyBty3VyzmzKfPp41dyl8cQpO7vmsKRl\npDAbD6Q20YpcUmypv84bqLtZFT7g0b0btIZP7XPIz48LyRgsqY2/Hn2yOX7I\ntaCTVFBi7qhUSRXh91Ym8Z9AslrqA+5M9tUf60onIc1Num5gwZsYZB6VCZaL\npPGTzNweqEmElzxUUVseLG51IyVesW0GVmnUt80ABT1JOM+sESk87uK82Ugt\nuEbPmusqSp7j7+QPwc5mEZ4glcMeLvP5RHTX+2tw7eiRbHOW4fDfSDVlQzko\nhyhLKb+P9Hi93mmk62Xdoj7kRKkju9RRktWfZnwITegWRJdH3r4I4FKZLEzv\nXe6e3HdAO0qxCb7+pfBPLvEXf26FB/eAQVYjgeXevV20kEFOFbDtynC++CF6\nv2bL4Xj/kc2l5xTNEzj+zREWNK8lM1jGPhAUc0dzuxvngqKWkoYDAZmdsGjh\nTH6d\r\n=a0bk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIArq5wLXcCcnHGuIVn2H0ZW8YvwdjkQtxNAYs3DVsrYNAiEA3vPRc+FG9Zp8Lgw+3Sm5WAXHUXmI2bjKW7kHscB/2/o="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599396631.7ade991da02ef3ca4e334f9687b50d0377622cd6_1599396632638_0.4123195707238625"},"_hasShrinkwrap":false},"2.3.0-next.1599398412.74a6aec619095c222ec1450c78f6a01743da7664":{"name":"filedirname","version":"2.3.0-next.1599398412.74a6aec619095c222ec1450c78f6a01743da7664","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"74a6aec619095c222ec1450c78f6a01743da7664","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599398412.74a6aec619095c222ec1450c78f6a01743da7664","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-WPQYbXOhq34vXPYVS+5FrEFsweQe2Eg/ivnsQhgFjj8kPsp194mXcEvfEIEMbcPTHeCo65SSDFMEyRsZnDZZoQ==","shasum":"3d6c251bd379ea0f4377fec1fc43027274463684","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599398412.74a6aec619095c222ec1450c78f6a01743da7664.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVOIOCRA9TVsSAnZWagAAFjkP/jWl9F2viwnD7p+Z1DK3\nyKm5ICDVLJVClej0Suxt3S1Zu/u4gcA+tKOWjx3W3LKzGl1vdExnfFQsbFAD\npMijE5Y6WrbbAHJWbhLIv4N7nRGwBkvoAFqaO4QZLc2iTOlYX2VyGOhtFcfm\nFw7jlmJKOi0kVS4CBQyYWu7wRpNpLaK5JE0YOfY8qR0A869F0d29wvOYhJTu\nuAmjregEH0oHWHLMEXbFbq2idNzOLjgQgarvfaU/keR3Kyrr0AZ3cPvkchNm\nZHeWsY8CzDaLTgHQqH3jt+w+RZoEw74nD5qQYF0Ee2uf/N4/M+WhjnLmGt1V\nBYeguxc3HYlFdietytabXNRl+1soaHKAdC3nUv8xIZluigq0PYZk/sRD0NZP\nogD8xePf+rpdnsv5bJwU5+lzPpnq4XvcUvv7uYKym+MolBNxRcEihZyFOG73\nxcj/A+hgCA++ySUdiUVQNDkeApiTA/jJ44rb7XP1OUhn1KTIndPW6OifKlKr\nRyTJXc1iYKN6pHDlss/SwTHuxbfq7gvUdI47AJ7rcJK3i+n+EH6DYBOex5kj\nD1VDNRIU0huM0y1E53EoPizu8qC5pcDSXJC+x3RYPyWnk5p6R+9u7hajQoYE\ngQRZ/svpdUeZBhE4Rv2GezGGgm2LsPI+JNtz+rd57fiq791zD3RJBCfMumgp\njKdX\r\n=bybV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdBNw0HCQyXC97SXFsMM56DtM4lBj5Z9ObmdmX768QWAiATHDqsWfqEm057pznVCEo9+HFX5SJlCi6ZEqONtMlTzA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599398412.74a6aec619095c222ec1450c78f6a01743da7664_1599398413586_0.16241430997361905"},"_hasShrinkwrap":false},"2.3.0-next.1599398597.41dc8f536045a8c2c003656581b5ca7104e853f3":{"name":"filedirname","version":"2.3.0-next.1599398597.41dc8f536045a8c2c003656581b5ca7104e853f3","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"41dc8f536045a8c2c003656581b5ca7104e853f3","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599398597.41dc8f536045a8c2c003656581b5ca7104e853f3","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-eVWEvmpBrbljyMwVuSCEJ6d3/yFeV8nSzbMp69SJrR2vzHH1Wx0YOh2GHmJZP/1r1A+HyNi2UKrW1e6PvjBH+Q==","shasum":"25e221a4a810237e94953eec2ee90b440475a871","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599398597.41dc8f536045a8c2c003656581b5ca7104e853f3.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVOLHCRA9TVsSAnZWagAAIJ8P/j2mqwh5W1+sOWWISwa2\nXRSDFGgLBZ0XWPwdLurhOZUC5bbww3P/ROODawFAbeglYvrlhMfR8Ie6Ccce\nHOYXPZ97zd0nU+JkOAjJPhp2/aabnZvuYoxzpRYchn5g2edexpOb/Cd2Xr7l\nbGc5TiJW3LwoNLo1a3pE6U2stBi3qfNxJcs/k7+gJQM4eAj/5h5Fs9ulXJJK\nrRQgkmI0RZf5D6nzWkhe+6AiwMd6Ec48qu1RNAlVut/nI9Qp9dtosx+ibzXi\nsPHHgq6Ctriq7suOC00qLHr+1PocKqTNFcbUmOG8qCvSPgYDKqFya2bfEDdR\n9UzHMDNFKDZSWfg+P1peGOo+rxVEvPhVP+0ucXw4rGKZhwFfMX9+OOeVJYLB\nYxeY4UmaeCI2/Vq5WXrHsh2DzZ+aKHGq1+HJ0RPd/cznFPIJwR1wqAuLBi5S\nQCvpbk1KA+piscm+u1/BNiJQ1pUeclAM/Rbks5VZeypzaNnl4tCpdaIEnV9Q\n+k+DpuJajwCm5kivV/qBCFuzlUKtP9wYyZoaxM0yy6X/BlOIANE7DEZF+hvA\ntTtmCwrz29v/W7/E6Qak1b0U5V/6uwnfY9cZyFeQTKIyJDFWnta7sXdilX53\nmUgQSNCUvJxFnN9Yijs1PJ8AImgd+ZhCogi4hPtqdStJlSimO/NFFzznoXaV\nwhK2\r\n=esmp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCacFGQTlLyOK4wAh1+dFvnvIxPlgpxoQvH8IhlFB0rBwIgKkN/IggZPI+ZXw/zvm31bPQMhU0BgKVvLcc8WSh2JKQ="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599398597.41dc8f536045a8c2c003656581b5ca7104e853f3_1599398599104_0.6521231096407856"},"_hasShrinkwrap":false},"2.3.0-next.1599994051.e0ff04b009b291b96b3f7917fae01adce10968aa":{"name":"filedirname","version":"2.3.0-next.1599994051.e0ff04b009b291b96b3f7917fae01adce10968aa","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"e0ff04b009b291b96b3f7917fae01adce10968aa","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599994051.e0ff04b009b291b96b3f7917fae01adce10968aa","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-TIw6uOk5E7xNf4Fp7C2Rr4QuBeLPoOSP9fCEC24P5kmJnpGJbdBcKxVVayGMAF0CqMX+0fA9ifCTnJ6mdibVPg==","shasum":"c48df8bb99822dad5bf865e9efbc95ae0ad99bb4","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599994051.e0ff04b009b291b96b3f7917fae01adce10968aa.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXfjGCRA9TVsSAnZWagAAE2sP/1oIYj7XI4mSruzTDZlL\nkZsxCEhB7Y4wN2ojjpYf5vzPGa/zEfASE0Q3akuPtOiy3OgQTe+taUPjqYqs\njKPAujfuxynoyYn0zeMT6x4APb4UL/VA8PGO8GOZ73ALVnnR/F95IkIUcmdV\npXNXhkIQuS8543Bn/VhCaBjbBlszzL9xWV9Es3ADJDn/3YSFOsgIgh73oaDL\nsfgDQKXp/himZtrPK/0ZEfIcMMcp5YuBjsRC7ptbDhboETzZUzte33db0Yf0\nvHO0mCn8oKqBsxOoDCURWtD7xeAmgDddB7GdCwTIIRCKsI1Ac2ug//UtyqAY\nvBYx5oamaAnbqUnAM6Yb9cxDGjLIQFaQq8yrX60yfXi+iBbW8D4l9Zs1LxG5\nQQUwRFSfNPYdkSz/ETJrz5W8AHxXLtuurcmwha9CusfoJhSPl8lhxcrMG13Y\nqkiB4X6zytQtHX1yGmZtfqGg03G7ZRpZc/o8inct8N22JvXwYifUeeogttIM\ngu950C5l7YBISE0tBTNcBfli4zCToNxQBQ/Dyj31V0n6Ke9hQv7YD74SNJXF\nj27HTeGQNfmg6+EqdzdoQMomoBZrTzdKe0xys5TIhAfqV1GsRPgOna+OYQ5y\n2N8zAxjvbz7HosAjJEjrpvjM1o+0HtLtdQIiJxJ3XhjvKLhMb4bFWYiU7327\nIC+M\r\n=j7fQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCbFnVp8Z/lOr7cjZinf6093grkjiDF6KNRvUyTz0mEwIgQPb3fGfZd0L4p2xafMHHwE8PciFeM9V0qBID/V8rzZA="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599994051.e0ff04b009b291b96b3f7917fae01adce10968aa_1599994052952_0.7691808048824391"},"_hasShrinkwrap":false},"2.3.0-next.1599996599.aa88d6815f45c78f5836c01ce68304bc00125287":{"name":"filedirname","version":"2.3.0-next.1599996599.aa88d6815f45c78f5836c01ce68304bc00125287","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"aa88d6815f45c78f5836c01ce68304bc00125287","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599996599.aa88d6815f45c78f5836c01ce68304bc00125287","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-OfWtX6ExWv4iyND9tKGpyEv3uc4XcCk0AOcc1RxYylphOc8IkS+L9IGUut7kS8h3rI6rzj9JETNlkhqoWx/jRQ==","shasum":"a318e1d04c7dcfb2a86df2452a460be199f81cc1","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599996599.aa88d6815f45c78f5836c01ce68304bc00125287.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXgLFCRA9TVsSAnZWagAAdDoP/0AiOc8Yiocb/dvEQnF2\nFap6IpjKRO7KnweSkOargniyVYTMSY9n10c3fGJWftGNfMiAz72WwItMaElu\nY/OLH9vvpVKcan17NZyB8+BPpEGUzOpLe8XfFqV9PkK8Zkk9GO3o7+/BaoUz\nuomShXJAI2FQLWb0Xu2QtqX4LqDWoj0EX5GKlJebPfdwsTNQFcWIxnLb0fdL\nTdkONE06oIvKZ5Em6Lujd2bMDZLjivNl2A5jXkz6dWd/tba/6QGWMfZOiK3K\nArxDKCJFRUC6u8SmtCmUQm5lTAu349+hsXPFKNandEx4vdISMyeVmCWbUILR\n6G0REvG3CCo8w7QvaGc2oLx4N73L6AqV02ExSxWV3LoCpORr+d+b4yMCLxIG\n2PIXcsyNQt89kvwk1KA6AiWatUeEedCoHM4wxwd7CdS0AMRvedG7IRJ5WwZO\nrgUUs9fHE7Q+hLAPTeFPW4lb4PvNhprici92R9Xaqp8RxNfcZ4cuMlm6B1ab\nXUPF90kyWoroqzgFD4Ebj6IcsIKqbqF76slFbWnafpo/3vSVew5SlnLsl2Pu\nHgvfHcLIZvEEW7glZFwqehf9JroVrSqzwPUgRY7zLIyj3IrQUOj8I4ZTGBEw\nbNq2yiD4GkEldkhRgin0rrFYV6WKTia45rJugjK/NUR9tcYXKChT0B8cz+sK\nflmA\r\n=2PwB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA6O9yF+WyfzPpLdAN+whh/e+cG5o2qIXXXCAP2KmYNwIgac7rwIzm5VjT2oEKz6hjVfpuJQCjd5FyaAtCHCUQh8k="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599996599.aa88d6815f45c78f5836c01ce68304bc00125287_1599996613608_0.4623321369113418"},"_hasShrinkwrap":false},"2.3.0-next.1599999300.16a2c37fbcf9066fe3c244fd07318b74f090ef61":{"name":"filedirname","version":"2.3.0-next.1599999300.16a2c37fbcf9066fe3c244fd07318b74f090ef61","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"16a2c37fbcf9066fe3c244fd07318b74f090ef61","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1599999300.16a2c37fbcf9066fe3c244fd07318b74f090ef61","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-45yXmcd/jKmKbKh1CX347DALYMzlAKjv3m02UqLwQ86nlfzqdnhzkigsgwcSDo62ZAkSO1YE+21cI+RZgNqLFw==","shasum":"3de97969c98600dabac3f1cb0f0b29e8e7f3d687","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1599999300.16a2c37fbcf9066fe3c244fd07318b74f090ef61.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXg1GCRA9TVsSAnZWagAAnLsP/1kA3uGjMLieCihTHswQ\nhEsdSOTpdo1XKINHAa+aLYJ9FlvxB72K3bQtbxUyE7cQvSrZaISOLv/A7Rvp\nwCB6fJvcuuDXiPsX6ATvPW9WuND30oAes5aJJATx4m8MoxyMhuNyWrrUjMaJ\nhIWXDgt8nRhYnBHBjENyddrLlcgR3WLyRvuEHxprkKaGWzhXckrtQrBzvFtW\nWqX9NHCmhReZRA329KVN9+UJoxqw5LtYO8/R1f3JGKgWph95d8EbTLLnIgFz\ncN/JjIjhWjq2bDdphmHbrK/rwSPmFKXTi0oyUeCg46+64lfZjwC58JjS4AVP\n6LBf3O5s4Og4pSxCx3O68Urcgh243buY9+5nVoOXdeWemMItH6se6srQIKGP\ng5rIBwQjYIQfp/tu2CVdyyYMqjR+3ymUIBgYFB5eVmyL6fe7bc/2w/f+aEvH\nn60VgTav+7VQmn2UwybQTm81/OCdpYV8Nc3NlcaaKgPWzd5X/iOx2s/KJv9E\naTscEMJYaRhB6SZEbRU/YFs/AtKoqdKCWWyroeVhA+2iOP32feSTXzp/2pVV\njetnHOJMZSeuqvR5keQ3ndvoHMk3eHK8jJjNCd/0j5AAB4uzc9pLxoiff841\nUzQDJwb5UJv/Iu9q0BeIjMvTw92VO3J2ZcN11R/01Dglc3uCeKUtM9CULAIV\nJKWr\r\n=S/fR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXwCvf6OPWrDDt5L3n57mz/gH2P+KbkXm0qk/a4VwFUAiEA0rgsPJnP1mWpRzl1NLcw1/o7inEL7cLUOfTAeIalIuM="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1599999300.16a2c37fbcf9066fe3c244fd07318b74f090ef61_1599999302060_0.1833279746068912"},"_hasShrinkwrap":false},"2.3.0-next.1600604579.12e72d652f758c642a1fa76620c3464ceafde607":{"name":"filedirname","version":"2.3.0-next.1600604579.12e72d652f758c642a1fa76620c3464ceafde607","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"12e72d652f758c642a1fa76620c3464ceafde607","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1600604579.12e72d652f758c642a1fa76620c3464ceafde607","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-nrsWfEBYiRxM2A5s+vVhwUZzea1lb3IVpeBgcr5naDL7CpXPgW4axo+ManF7iC5rnahJlMDoEmN2OFyldg/ADA==","shasum":"e94a6a9d9a0f547edc4778faf6aac739020578c3","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1600604579.12e72d652f758c642a1fa76620c3464ceafde607.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZ0mkCRA9TVsSAnZWagAApSAP/0UEFIJYQsTAR1owa8Mj\nVk3TKWsZjVsP8GgCE1M24pfYbGxzeyvtqhY/0BkRGOVjpG6KMdk+0G0ucp48\nqeOfai7ZMer8hAH2ld5ynfq8ufNKR43O142Ac+rBD4lAc7bw0K6aJ+P5LKf0\nUBK7K4Oiu4B0gqQZnfDmQVTa5osYPAv0BKP9TYuBGhDb11FQGfR1ty/2gWQ5\nrqn0uts1kvkIEzblbyBIOFR27iGtEUwxOaPc/9xgzGk7S0Smb6hSKNvMf8lG\nJyttb67xQZ9uPcoTUafMpOeTspyDrhHrB4BOdxIQpHohyqxGCLsQzkeojqFq\njjBvxv5+LbQ4rPnUvydP0u+H6S0VLJShC0Hbd7mKrcemOzw9yeuTIwRb15Q6\nv+FNWCYmftJizt/ijSKOvxqsINB5PTBSmIXV4daOjcLvWiDJf/IdbApwNcUm\nYem4Lj3/vE8J9juUoYd7poGjaQBY1ElVZSx8QDSaWMAflv+0ZmVgkszuaVrR\nEQxoxU79oioAhbf5HVPmnYQMevtgHO/qyU3NITn4eIeJSaKrWMintdl4g3vw\nRTWIRGXLKu2tDllQjNNHoMasBCd5+Aqlg9/AjmmTsJ/fYnxNAOPE8qHQBSsF\nYEDo1wdCNEhk9Myo8v9rW1QcmHrBfUGOWdZ0I3wd9m7c/nufOwfJKnD2vXBA\nJ64h\r\n=AAtX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLE6fRqWYdYLcQtRP84IAePYeJcJI2kQIitMv9GhWXXAIgBeytfESwYc6CMCEg3WXYb79ZTmSOiKIwmrFBgm6pLRU="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1600604579.12e72d652f758c642a1fa76620c3464ceafde607_1600604580252_0.27457774088681997"},"_hasShrinkwrap":false},"2.3.0-next.1600604636.90b6cbebb2c0a6b811aa16dcf72526f2341e4590":{"name":"filedirname","version":"2.3.0-next.1600604636.90b6cbebb2c0a6b811aa16dcf72526f2341e4590","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"90b6cbebb2c0a6b811aa16dcf72526f2341e4590","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1600604636.90b6cbebb2c0a6b811aa16dcf72526f2341e4590","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-OQkOOhh/JPcItev2+fw1Fzp3eRm4xDUq+lEAoMpx5JrusGF2JwZ/eYu2k+02YOLmtNXLoPToevXuP1OXcIyK8g==","shasum":"6aa4a28c4024fa90811a6c6fdea167ffe5fe4a6f","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1600604636.90b6cbebb2c0a6b811aa16dcf72526f2341e4590.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZ0neCRA9TVsSAnZWagAA5HYQAIpk958tUQ8YgFam8a5Y\nUQI/BiUiqcsJpce2UhvB//siapCo1taojQPUrHwpcQMt+6IvlW/ji8W6nqBZ\nJoiw9zYclwBVwpRNBqO0XKRWuMFIUvlOIAH+pOcVufhVQlJ0ROiMcDRvw14k\nHaa+cQU6oUb+xUNPeCAaKdZEExl/HwQGnDyqnbc4G3L9MPzYgdDDFhX/xRaj\niwAi0VFi6Na17hHK61DvzoDNzfYTN3KDAgdr6baXwBlSm3r0FD3SAmGxc5sA\nVGTxtbFbNVDH4m848cIt+xFQfltB2hKbQFXMxp68igOfplEQfJSSXNTHytjt\nl1Nw4DrP1CDJeS0gdadjIe5luFBBolbwHiZeUwIujZfHzbxGSEbqXjPbqmyO\n4wLKNkTssxcJsHiPBtBfWg4bkWYEf9yqHwHLpiSF0f26rb+1dtm0DkRYJHKL\nHSYp2SGPvsga3LStuDT6mOR7WadUGjm2pSw9FryGXiFKaJmcDMi20tok6tP7\nnmdBx99d28t0TvDEPo7RADpW6dhmdJMO9cSiTq+q5oyYXPeJmRN8DvLBWw7A\nPyay88rkM5CD+NIGm0gT92sImtDwTpmafwZz4phEHqGWBeRPW27VMRXBOeSC\n/LPfoXhwCOZEvbdH4utEdR57iz5CNcrtqAP/kcy/0S44Q9+3Y87kbHWF7fwd\nZxhs\r\n=6I6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHo8DPlQ+o3Rq7l5vrBaU3VAkBvh+U8Pg8t96d9VShwyAiBeIz3iZTBWTtXZnvSU+Rx3AwzJGMAFhmiLNkFO8vsuCA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1600604636.90b6cbebb2c0a6b811aa16dcf72526f2341e4590_1600604637829_0.5694583912846718"},"_hasShrinkwrap":false},"2.3.0-next.1600607202.ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd":{"name":"filedirname","version":"2.3.0-next.1600607202.ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1600607202.ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-4PiRLnNUjG8/xklR+O8wYwRn5gSS+80pXvGsh7ehldzDrl6W+YrmpTI2RewvYIH6nqQu8Piky53RkqeBbBwN8g==","shasum":"2cc2db5df4e2aa94555bcc70c4735a315ca99fe4","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1600607202.ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZ1PkCRA9TVsSAnZWagAA1g4P/Ajn0bJtOQGpQtxWfU/J\nnZ3+Ck+nLJWNXefqxjZWd37b+AY1Gdwe2Apz4f5HuR8bBMYfumgKiFj75Je+\nAamfUTmgYEQFIvloH+Fisq/cGrO3S6+yA32JjIp1mtit0+GH3qLWPu+YoJk/\nVGHY76td/0ElAoWlkCyHesbxbe/bA4sTl665rbjM63fE0VWEyIvD5VMra7Xv\n+LpbhVzyjW+oImigzxm9E0tmr72nvU93np6pgV6Kq52rGYdyMffbh8pcMMhr\nIu54AJ63xjLytVmcRQ+kQgJtrlKCewRE5WKx7rDAkxC9ijJxGBrFzRwHAL4r\nCk14xLpTbSr+Y6pzSvYju/FMNi1yPGixPwDBO8A4v8ahc7Q5qy5RsdIRBg6c\naGZVyDYesAzY8v5p1/7ZrLwST/tLCDHcoNEiF4ryzAmrUYXxTlUYMBZqhIYI\n0y/1qXhiNAMcMtTLrDJpd9L1rOmgSPl7fsqD4d03TATH0YMcYLd9PbxAGwfw\nWksJvexO1cY/cgYz0VIEOKDSWl8MhD6x8kGkHVU0HYgVzLUm7g5hlhWZxyuH\npnpisx5NoUiMCrMJAwDlNPFzA/d7o4kCjUMr59yyu6yanMtz8BrhdQ7Hhbxo\nkrcjN63cc1BTXBsZ6bsBIko9eMi41UrArsCKJ2mLNp6iKwObFKEUU4/XEDox\nYGKl\r\n=AR7f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwDESxRdXte9fD+Q8oKmO+M9r3bW5sh25zl3cHyoJ+jAIgU++uzuaOh3VLHlmZXOAYWX143ro822uaT6A3lE9JaX0="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1600607202.ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd_1600607204035_0.9785869541527306"},"_hasShrinkwrap":false},"2.3.0-next.1601212604.053c3b513fb2edf4178b3269b2786eab66ae72d9":{"name":"filedirname","version":"2.3.0-next.1601212604.053c3b513fb2edf4178b3269b2786eab66ae72d9","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"053c3b513fb2edf4178b3269b2786eab66ae72d9","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601212604.053c3b513fb2edf4178b3269b2786eab66ae72d9","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-en+kyR5Zi/L+Uz04rpMm7BnYSqzLOz+rTbHEyVuP9Rj6eVeF7QT9GKTzBnP/m0pWm/csBgTziwD4EF9klhTgNA==","shasum":"e88596467d58f94afe7a79aadc643ec0e37f104b","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601212604.053c3b513fb2edf4178b3269b2786eab66ae72d9.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcJC9CRA9TVsSAnZWagAAeIQQAIJHMX5b4rLn1C1Pvl6y\nRE4hGK3czDNpWoV4VLefGALpIdJIJdGLfWDVVHwxRVp8zlabIPZ30bS/xtB4\nwLJGRA2v6SgS9dFFFKffv7qb/Mqv13w8/xjtY1GKveOiBypbzI02irPjW/gK\nk5uyEvmWYSzRjAzMd0mrP5Wf8VS+VNKM5r0U7CAdNA74Lteux/JnkmlWCzrJ\n+z4Rycp5I5doe4lN978eNwt8Cmii9goby5YRxG5EOo1k94ilC1Wx+78bGmY+\nNEh1B46dYUhunJuZGeZXCnnli4aJxXEWWRyPI0ilceO8DHmgVPJGNkbm925H\nWsyvT4y6g+EUTTVz0BVhPiydq8Jyv4wuyheiTm+nOslmpsEJNPB6sTiPh6fN\nQ0cG3Gjv/MDqlu+QoArrClDLJXXHcQTkCtE0L8TTUdyPGv+DVghh3qpTGGtD\nEyPv2TLeXD5ivQgPVpIf6tDFFYAc17Uvw+M2wsmBMRB81BldeB00UZzESjW5\nSh7THhZJFIIuY0Kxv1fcvx5POuWBHgOfL4bkQm1RKj3f/3op0GslxS7HtL1m\nJnIMFkE0NBKXkB/GLWxsfmVjKk4NXdFYK1mLxBd90ipSHPNIKIXNty04Ce3b\ng6dU0U22AhHK4ERcuICdBddayGvJI3osWsVGXaV9Xrsgm5XmkcfJ50ILHN1Q\n++p/\r\n=YZSg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRxKqZNbJKQiA3xVLyWht1Mxb4PQBe6jFzdns07vCzsAiAvRlRXmv/jelDHq+vhyOoFtQ3pfNTX7L7Op20lgOIB5A=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601212604.053c3b513fb2edf4178b3269b2786eab66ae72d9_1601212605366_0.6526915187430906"},"_hasShrinkwrap":false},"2.3.0-next.1601212647.7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa":{"name":"filedirname","version":"2.3.0-next.1601212647.7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601212647.7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-zbd/a+iU4qotBAwKzh7WrAZyr6EXWs7M7Ixe4h5FvbiKjx+LBqHKr5svCGUVqMwjnhiPdSSTmjWaFEjLESB3Vw==","shasum":"714e9a53a294eb5c03b9929c97c516f68a41f921","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601212647.7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcJDpCRA9TVsSAnZWagAA1swP/AqMABSJ6w9Yd7Tnv0DJ\nwuczh9v3qB7AhPWNz0+rVGZxtl5teA1NiBbDVzKkPQkA7qHYSj236FZWtTA2\n7y/6fzUsdSt57A5u9DWyUde/ZWdPknmpL5/IJOba37PDlWddoTXEyMakIgmA\nKJZOtR/nisGqc/CgUji2IW9nln2vNWGhODTXwCUaWHgS5XCZqIQXhRZkaaIT\nfEQceOw2ucZv8bIVGwYomdWYiMARONqKpuDGxI6E14wA5c0VZbjSYJcY7UVa\nsAB5gyOONmPB28U+paHPmaiDA8sIqI1r3ZhGlGg0E6ewLGugr7V29sCRAgDU\nseflsUfzUm9qg+VLO3xyqQbq0lzTa3N8usLD5RVc7Q9kVorqIzfF3ekMTtjz\nMeVTCIBTUhhtuII6cqbQJCAVdIbxS/yuFnFpvsx3h/hx74TW4t9jQlAR8rPa\nkXWMrSbLh91RgUL5r+70PPi4jH3fm9/iyx2nLCwOQG+KaXmwQqQGyeGsITVK\nnTTq2MHNELZE5pZIaN0t/dijPBqRpJ3abk53Uo5bB0jLzM5J9UNnMq3JKkDz\nyL6+fx1SLUSrpTY4f2kNRD8RkIYgd7AlYV+HkVbQ+6Gz+CTYqeZBftj7gMxj\nGBRl2bW8Gv8xzxNQzaYGLddC1F3NxRBLxDeGB6gUW7Tqs+GBqRqKrf2Tep49\ne+Hc\r\n=j1LI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBjmgzCfdobiXY0eVLMCahbB6TOkmcN7SuVaJGBuAx/gIhAJT4Vam9/XuoWwbWrTSTBVd2/wf5stgQMAx+CYXVdHAR"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601212647.7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa_1601212648984_0.1509388232615474"},"_hasShrinkwrap":false},"2.3.0-next.1601212693.22aa6f0e40aafb5312435b1e7aed95dc8258cb0c":{"name":"filedirname","version":"2.3.0-next.1601212693.22aa6f0e40aafb5312435b1e7aed95dc8258cb0c","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"22aa6f0e40aafb5312435b1e7aed95dc8258cb0c","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601212693.22aa6f0e40aafb5312435b1e7aed95dc8258cb0c","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-jB2pDkn4MkOliFShfi1i5wBOm7g1Ii+QG2bhwtdMpwW50BiO79wSyaozO4HRzC4EwFJkwoV5vfIntCTotDMHEQ==","shasum":"4f9afdce4b156cb2e1e86387b599cb96eeb77484","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601212693.22aa6f0e40aafb5312435b1e7aed95dc8258cb0c.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcJEWCRA9TVsSAnZWagAAZscP/0rp23BL5xomTNRIdaCr\nqM/Lo5JBnS43emepx0rJb+L6XxV/Y70luCxhjzraSfemsLWkTpcoO+zNPhom\nV81f8CK/DrGRFCytjoSwmG5cTOObsuskGS2BtLmgfvacLxSbUqGzPVSFPFA1\nrBUiWCXXSZgFFFbgCBpZS0QoqHBnKQDk1J9p8uzeTLPGA8ojtvyV8AaE3pxJ\naQRtaF46gcVN8XMrb9KZkpSTSq6zj2xLVOnc7goU+TyAmJ1HYgc4Ff5+oXaW\nXNijHAc+VMnar9TFio8npjOJtdNnwUzghZUCPVDpie4GQSZ70IXQGCFm3dye\nPGHfWiBGHF9VZdWhdvxKPkoS76z1q1gzJzjljhwdUJYK3O8GQrFpZ2bDrgR3\nmbzU+EKj/fxY7Zh5p1FeVxF6CsBlbVt0RQh26o1GN0FmUEh7vox0CZklTqa8\nZ3KCHTgdjkr/K2aftXefBku4EAMBIo4CWwTlhcmg2feECm/3953z1fMQMpbj\nCguI9dZLzuBS24l/w8F3+XTTc7tpL4fy+fQ+3w452UIEG8jf4EOmyYs4s53E\n4OMV135XcFKizK4JYTmZsCMXzKCxSXLdrjAg6vkbiY3601JTSq69OJcgrkxs\nqgebm1WBhT+SsaNagengZMUDbLH1gtFwZ4rkiYAFTDKXNcrqMzSdYNUibwtn\n8L8i\r\n=1KSW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0l6JDE8osPCYr4+t2J00BSchdBVw8RbeCyLeZLEfQfwIhAL/Yu/o7oKVzXtVJV/L+WTLT3cSzazNlk/fObrtC3CsD"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601212693.22aa6f0e40aafb5312435b1e7aed95dc8258cb0c_1601212694345_0.9948989716059531"},"_hasShrinkwrap":false},"2.3.0-next.1601212736.c27468b7262de698e163d10cebb38aa7918e3ef8":{"name":"filedirname","version":"2.3.0-next.1601212736.c27468b7262de698e163d10cebb38aa7918e3ef8","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"c27468b7262de698e163d10cebb38aa7918e3ef8","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601212736.c27468b7262de698e163d10cebb38aa7918e3ef8","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-JKkxoq+uEvVPLPhmRH30hyIrPXtg4TwaDT8/fNI/fabR9ROHSCuvjwCuJPwBDU73MoqEVSwxN9w2lE80EPqy0w==","shasum":"7a5f2160cd0ef681d76339e93c7b3fdbbefb90e5","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601212736.c27468b7262de698e163d10cebb38aa7918e3ef8.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcJFCCRA9TVsSAnZWagAAP8wP/3i+dgbXUOFCHGnJJXBh\n/eu+Se5VkaI6NNMirggNjNF1VfycLUmvo4ZG5B7/JYISND6hqlR6MW4h4yzn\nhiSjelsfK1AditZkZVGLD/vsM/ljMlgyGI1mS9hjkB1NymAy1MYgBnhstWly\nFOD+z2nzt8YxOO9vQbmpvOgtNKVYmA1l3MFQRJ2JmZNefvogGmsduvF2ebQN\njYlxQHUGXQsROsSXPxRbPK1i+JF61wNGrNkdoR4jVQ2Dl7U8FTgJnuRFAdr8\nxOgfK1X4I/fj7KZUQn0oRp+X2/unjB2kN46HQrX4zU8RZdmJyotSpHOyK/r0\nMw7v02kJVaH11GyvbyUk+u+BeT917M5qtEy2sMaIfluEt7ZHyYv8oRQO8t88\nt0NhDfaV13lWmVqH+k+mIZEOhBneAOmVeEgXlyspAvI8V37PJAUDTIAVgBqk\noSXB7Qcol4ii3PPA9VIc/6ABkCRiioE/i/tz1bGo80Bvntm3PvaCL+NMf72l\n0mfbRl+TP+QM5TiKvK+wDA8q0DYfpdylFtno4LqBFdBjXzZEKbBOqNg4uIbP\nnvhcVtp6aNVW4SzVTK5Xg80YyjmBHQ5RJHVHgOseJwsY9dcyLz0C9XKxgjHp\nZEujCReOlI59MWDmGjpjvMFodPBSlBGkmVenZj9riMNdNLlmm+W7QkC8Dcg+\nzCQn\r\n=ETNu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4YDY98qn8aPCo1Z37++1eEAwWKwQVwcxzu3OoiEzZDQIgUW1tJd0JzP9sSC4uD9R/OhIpabXqSvLAvhvoFwHlmgU="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601212736.c27468b7262de698e163d10cebb38aa7918e3ef8_1601212738044_0.5449511685476851"},"_hasShrinkwrap":false},"2.3.0-next.1601800005.cad7529601701afc7bccb79ed40cc87524f20c13":{"name":"filedirname","version":"2.3.0-next.1601800005.cad7529601701afc7bccb79ed40cc87524f20c13","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"cad7529601701afc7bccb79ed40cc87524f20c13","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601800005.cad7529601701afc7bccb79ed40cc87524f20c13","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Utyi6u41IzAtaac+x2NawsicgXZl156enHWcBlcMBSbwwrIOp8EZlsCbZl1ke/q+Wl6wEFUFtgKi5aWJw9F+Uw==","shasum":"de1c1799c38e8cb4df3dce7bd1f82937969eacf2","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601800005.cad7529601701afc7bccb79ed40cc87524f20c13.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeYdHCRA9TVsSAnZWagAAGFAP/RFW382aKa5yOSODacou\n3wpTyfDI+fvQKCooOtDkmuCGXJ+d9hPb9HpwNRPYVC1V3HAHaRU+Gie+oYMb\nfeg/xxbu9rnJYbj86OflP/Qg/WPKFJf0Pq/AnBulg2NPXPzRwWqsRIP87gbj\nLGsx90ovGmIKbActi0KO676tzdSZ4l5mGPxLjxk2LWnymGg9r4msJB9Ovue4\nyX2HswZnEFI4k9M+hSda662z0+vQexjPmg/CC6obRATVQU+ekJn99btUd3cC\ntYF/0JIQhxnJJ+JjxGelKVCcnOq75IeFCz8y2EU4D2rlJh8tMjVpFP8T5ri8\nm0/HIHlNOMpTEziV5oHFqvk4nyvAraQWrFkuG3U0o3ljM8aex8uxd0Npgmi/\nMKzWyFiEqF2iYBzwA3dnKv99R4/QHE900WsSXy9bvPDJp3FkzbqBRKwiLc+2\nxP1S0kaMIr5Y1Tb3ezjk/k1d+az43HnvIm5K89/h0QVWPIOuwEbe1hIVRUzk\nU6bFqhV/L7WCQRzKtZRVR56PwSgJ4ttpLt9L0graKVejc4/LV+EL2/aDGetn\nm+Pcz7Ymna+ZCUsHCcLlVI97G1JchBR69awDJARDLmyJ78rIOmi/sHjzbZzX\nTPRdfidUcCUouTcdwt5dyoRWgIQJp+u6F1gurvuv2nS24LQ9uhDFJ6YtN3rN\ntQNy\r\n=DW6m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMbi8GgsAEP9SalC8UmkUPgUmL1oQZQnHiI748SioJiAiBEShKDFkUIf6qkvqfnkCZB4+xHTP3kaDW8btHKP2/E8g=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601800005.cad7529601701afc7bccb79ed40cc87524f20c13_1601800006658_0.48545913921831874"},"_hasShrinkwrap":false},"2.3.0-next.1601800059.9dac77ec801f29422eb77bbca80bb35d67bec40e":{"name":"filedirname","version":"2.3.0-next.1601800059.9dac77ec801f29422eb77bbca80bb35d67bec40e","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"9dac77ec801f29422eb77bbca80bb35d67bec40e","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601800059.9dac77ec801f29422eb77bbca80bb35d67bec40e","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-6vISiCzUekfQrVVXc8BvDX7zeUnEKnfUtAUnVsIPIxFH2046ZxhqiJ/Yb5xuSDHkS/jYKB/UEn/zEKjO0IRJHw==","shasum":"cd3156e393c59a334fb70f7d90bfb1ed2401b538","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601800059.9dac77ec801f29422eb77bbca80bb35d67bec40e.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeYeHCRA9TVsSAnZWagAAHX4QAJO/c6GTN02GRG9/TlzI\nzWFI0BEjK0i/lAgM427EcwSUViAtXjdhA29PIsl0xZsp1n6MZ7vZIx1GXZDr\nZUIW11fWskVtDGlADSIGzsA3/zpDptmCXo4HCIG77Z5038mzEv+YTvT7506x\nrv7KtBRX2u69nnxEMTnZ5VIc1oHr5DkHRbPrTD9w3E1iFTVjJrt73KC/HJlx\nTv0WU69uPaNcUjXEeJ277q6qnjxleHZnB4EzG+h1YSGsDnGyk9tbCiK93U3L\nm5bVKgYXEIDUam1EngZfLkwZPQpuf8EnvhkVO2IzXD6IJMB+bA0aIayP1EPL\nlDW5Vd31i3hOmA15NJw88hgM//bteUPq6j3fLHqcj9RNySITrghFZQCbSYSN\n28ygrWqoSEYU1Tw+6ya8Kn7eMLsNhiVyRzzXHlNEDynqRu4pXF7mlJGA7MLW\nS5AWBlcIuo1j+Jj3LGa14KA5UxpYARHaG0xTlI4RtuvKHp/MOFiIWIJalZmT\nHopBp+orEXAZhp+OV91zQpygaFGQJOq1JTsk1NNck45IXoIfG5/UZKJoFK2M\ntpK1naBOvW358O/Z1eJn5RqxaZCWAp8jpA46fNziKHFGQ/2EfFsF2uXjh2fS\nMAAhBdqUkeioHqZh0zUjyVkoqhIq1PN+9ZhnhR4bNSYuSfbiNUjYI8wuSABx\nepgS\r\n=JrIj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYqMNIdNeqFbBy3YQziDcmOEI9BNUqeNulP+8w/vVn9AiAKhKB5u+0q4kWdJqHqVfo6J1PyD2UtsRgk7Nmq747oeg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601800059.9dac77ec801f29422eb77bbca80bb35d67bec40e_1601800071070_0.8710757688191382"},"_hasShrinkwrap":false},"2.3.0-next.1601800099.c2c8da385f3e899bd23a62a932305365159dc288":{"name":"filedirname","version":"2.3.0-next.1601800099.c2c8da385f3e899bd23a62a932305365159dc288","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"c2c8da385f3e899bd23a62a932305365159dc288","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601800099.c2c8da385f3e899bd23a62a932305365159dc288","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-GBEBSB8ou19mZ8qF1O618TjUiC9zOR8wHkT979bBuC/b3hG5CKnEEjSngbnxoMiU8e9f5z3/RBO2LWJZkjo4cQ==","shasum":"a88ab3de1683744f55e758f616b53d5ff1e791aa","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601800099.c2c8da385f3e899bd23a62a932305365159dc288.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeYekCRA9TVsSAnZWagAAExYP/2pg/P31eiO0JsoFhV0q\nrE8T0yiqvJHH5VnWDLpTxNHQQK0zrxY6i8pdKjcjG9vILSUH1KXfGfDzLc/2\nkG47AehoKhhb5i4BpVmf93btOAs5B6xGbA4Tqfd0tYWgjORFDZsyIKAIU9Ep\nawjP5fU0WKsg5s0Yd4OsyoAjEUd+lhTLh+Eipz7bebTUTtb3kPuLBrDlFsPn\nigaCXMRaLywwIIDxKwvbk//gg/fWdW7QZsQ337xcXivqzed1ae4rJ4YUFmYt\n5ipfYUEmK87KGr1yWHsyoaPLfoA3s0Di21dSK1VbKxfo1TEFl9VABV2W7Qk1\n0pFTdXDY8Tbt4DocriUkyjShZb/fI42/0qVfD1LDXpM9KLfg7R7ztLfTxZoe\nsV/D3VzZHkGRO0U02tmX2a8fk8CTIW+uQdsRhffIWhixOZzdjWSChTdUlvdV\nUY9upRtNHqJ0MPeV7Ot7dRa2mZJ7UMTdyBA2xDPOvvoEMJrZdMSs0ijOjuif\n1JlG3zXvjVNrhEDKRbadggyhwCxJH99U0Sx33Rng2A2T2HKpAokixf02LbPD\nJT5IJVeXX9demyQh1+SCYDJDfjYKPoBve3BguZnMA1Wn5aZoo7J6A98wCbwV\nXYcYcesb/qrC9Rht3BC7csExeoY7s7fJDyCnJ7oHofVgrpf3skEfOvwOltw4\n+IEK\r\n=xt9G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFabC8BDpc5b72+PjkR/gbD1VcxIDEid3ywr1dt7+pLYAiBOJTHhzRmmR9vhfIuwiEF8OuqaU7yYhLHrR/nuwkgCyA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601800099.c2c8da385f3e899bd23a62a932305365159dc288_1601800100304_0.94336316205226"},"_hasShrinkwrap":false},"2.3.0-next.1601800149.b6162149fcb0a509e45bd50003cd8655020df872":{"name":"filedirname","version":"2.3.0-next.1601800149.b6162149fcb0a509e45bd50003cd8655020df872","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"b6162149fcb0a509e45bd50003cd8655020df872","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1601800149.b6162149fcb0a509e45bd50003cd8655020df872","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-eC0ppEU2bke6N6qU5TLciZiBjgarMnXBtyh1u0b1XkPhuY30+/b7kc9KAGuNoXR33B0zQsbWFZNF0wEdAefdiQ==","shasum":"28e55579442e966a2ff46d43b2252ee3dcde79ce","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1601800149.b6162149fcb0a509e45bd50003cd8655020df872.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeYfXCRA9TVsSAnZWagAAQEIP/1HoB8Baa89j7JiV62VF\nSujbas7dOXg216WVuZ2tuh7EbEo3gfrmBGa3Y+lwlnWBE1kivqsGWuhvivBS\nbaI6Q+9xzuNlST1A+YHfKp2ZrCNJqkJS07GZoBWebDG1lBlHNaiMJMmUzFWU\nHWCMDxIQAhYeXQ6xoLfKptdxiOu9cBRWCFC3+J4t7ZNb4CXVdCWzYEo4TRXF\n200qIH7sav2+AhaILGd0eHDb7hvoZmRvDnFPyQffOgrsm0ErUyTgmH10G70d\nLA3W7TRhvR/S9cog4awQgCve2hcVKTL6SeJbdbPzknRbWEIf7bNmcuqevgze\nWlm/vmbBhZJNB39Vm8ftyFy3XfiZP0qi0sDEakjw35Q/al175OiAt/u9qO2r\n+lAa72ej9uF0wvwfcRptrQg4DLTKq56+5P16CnCFxVQWTUwHsnedNvARYXJq\n6LOBOFCg4twKA2KJ+swpXIzmEoQJDgXRCWkhIoSkNo5FYQKXnQnJ8xDK+3Zu\nKwq3/Vud2n11eslzd56I5+ASR3YRCdO9UsTZKYwbTn9RpTt3ZSbyUUNKmdRe\nLfuiKnrkGFsc9p/MCG94vL1CysT41kFsMmWjlwLCTm8oURTuVsIULg/4cqvD\ny6c81CR0luVI/JnkeC4T/Q+EJp8S22oirctyFeFbIO7ZEtb/xhAx9MKSe0/j\nQsN3\r\n=M0Jc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdl94VNR44QjFlGl2dzVy+rQGQf4o/LunAUjcnv0kwVAIgZHjOW2MyiQ62mvEslnh0eGDg2Krlcv5dolc2VbPVVIU="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1601800149.b6162149fcb0a509e45bd50003cd8655020df872_1601800150797_0.48390265355467443"},"_hasShrinkwrap":false},"2.3.0-next.1602412150.d8552e019998058a04da358bda865785ecd39d4e":{"name":"filedirname","version":"2.3.0-next.1602412150.d8552e019998058a04da358bda865785ecd39d4e","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"d8552e019998058a04da358bda865785ecd39d4e","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1602412150.d8552e019998058a04da358bda865785ecd39d4e","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-T5eOGu5icdJm64LLaQ4tp+DsUBmdCybrhwPVGJX6KDsbajt+ambJMsiCd8jvMavgtP2dR39jIQNcUbRD1W/e7A==","shasum":"6249cdc8913da4ae6929c87e4c2c506b3a597973","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1602412150.d8552e019998058a04da358bda865785ecd39d4e.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgt54CRA9TVsSAnZWagAAaggP/jXwSB0R6hjh4Gd7IVOg\nRBtn8Zt2MOe7lTyxpBXhLc3VLHXNDznoZWY524BCuPv5hRyjNp48uRjqKZ8b\n1A6JqpSBcw/CevsA1nrfeWCJsGKJlBF51meppZVs0H6P/GVFOfsAg1umn6Pk\nG5xkZqNiua7D0w5KT0/TS71piMii/5Q7pxMV3wIZANje+6r4t/2a5KnLtQKT\ntzrk57eQ2rPnP2E4oJWaIVlcXCjK2N0x56ha73BBGTgir9Zsg+BZ/2dj8GFv\nF841i59eWtSQ+VJ8IPssBVPrPEMBBl4nsKqsHsDXvAKWG06nwa7MSpG0s+Wa\nn/qg83cpuoueEEw/0zNw8Ftte+tkHkuNDtOqPJsJuCxdVJE+0M6hYXfmvZmc\n6for9eVb5HUyVR+LVoUG9PIqdPCZnzcp2PcrartIac3hRP/RgVmyD4MzJMYQ\nrr4jY7V7Nt+yYMTjLdandWlLkwpqzjPKoH6mgp7HunkLw9z5Xz7hc+aUzqTV\n5XlonnnWwhaUx458C2yV7wx7rvl8D1kJS1ZpWhbLpyK17VyURB+eRdV3z7dW\nF0NKgCqrSA43Ybf0f05y5rDr+BKtPPpgOEPs/NECaIWbiwHL2MSFGqy43AWK\nd637WiHfUPT1osicWMjTl2hO6ZgZFxmXTz0Twi32I6w7twYhOntOvaNtSNv7\nwLWd\r\n=HhAh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmuPeTT+4YpTTgIRGA3ofEpIcKoGK4kQ8r99Vmkl1crAiBYCwca49FvkdmWoO2wy4+Pvmwx/yEu9WErJr5uq6sIGA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1602412150.d8552e019998058a04da358bda865785ecd39d4e_1602412151753_0.4823428646585719"},"_hasShrinkwrap":false},"2.3.0-next.1602412199.6140983d15503f3ee2976a1b3d8015897f8fbd57":{"name":"filedirname","version":"2.3.0-next.1602412199.6140983d15503f3ee2976a1b3d8015897f8fbd57","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"6140983d15503f3ee2976a1b3d8015897f8fbd57","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1602412199.6140983d15503f3ee2976a1b3d8015897f8fbd57","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-M8Q7GZU7etkAhh5F/WSAdFDlZqihbcDJvD7bk6WdP5yd+VxoR7+RACnWpcSTWwpxUty9pQv+vAXn7eEwOpeJqw==","shasum":"b10942db7cd520c13240e54ebd8d14420ad7cfaa","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1602412199.6140983d15503f3ee2976a1b3d8015897f8fbd57.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgt6pCRA9TVsSAnZWagAABwAP/RrFSe4MTlf8ETHv6KnX\nZfPiiM4kzNQtSqLYnmnOe1Hv7xcWGbz6lDx1uTZMEpsLKISv/dP3c8Fujd7S\nJc7i/lvT3Q9Vy4RtMoxyAxXtyA3C7IdeJ527344HQmqlCxHZUrfJMfQn315B\nJY6nNSe1OkmbJlVrkUayxTYZ7oEnc94KReKWTb2eyYBgijnOD0e406Sl5dZt\nzT0j7MmtMJ9j4tnJvkMJc91OSVgy6qe/BLBvbQoTqxr5StGCtv9UMMaraZVY\nPFDRuWxm1unP5mHl9rdKiOrQpM28RCsE2OnQzsrTShXum1Hz1Pj6TluZekcY\nMN8Ozz5GuX30rYelBDw45QI6Z3ZEdpgut5+Giumc/Xwg1uvZKHYYfq176uiZ\nrQghMJLdMdeFtfB2ab6mqeHg696813kEw1YJiSZCSKrM83h2cvnqOHve3ju+\naic24vXvZKsfgCM89cg3x52vXdkviDT29rB4VhE8Qukg5enPWsK+8UevKY5R\n2Mn+b3DT9ewWwpIIr3yUQJu8Yf7xM99oyLJbFltKyKX78BmA8V0JIvP+mOgi\nzMqSQzjF2rj8Q5Kja7yJj4M7UIta2y6LRJM87EJlcqmwAn6oC74Rl50dko6g\nH1xvBH4WEtj8jgypXOZe3sH5pTbIb8LTr3deqhGfZbMaAgX+sp4CVuf28RLX\n0Qnt\r\n=ef4o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF9zC7fNwqQoYqNpwAeDVjGIGeDZ2SeNaqX5k8Pn4t6RAiAxw4cu+MnMghN3TfCYfVS9OmR7rcKTvp1X3C+Bq+Vmtw=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1602412199.6140983d15503f3ee2976a1b3d8015897f8fbd57_1602412201069_0.017919835340374224"},"_hasShrinkwrap":false},"2.3.0-next.1602412238.60a4079d7a81bfe07bd25788a8b2fc426cd85041":{"name":"filedirname","version":"2.3.0-next.1602412238.60a4079d7a81bfe07bd25788a8b2fc426cd85041","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"60a4079d7a81bfe07bd25788a8b2fc426cd85041","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1602412238.60a4079d7a81bfe07bd25788a8b2fc426cd85041","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-lVbWUlL19x1h1tv9gvUGKNb9/l/h6bjTxr3n3GmFrGJV8ej7c04+tbFR3mHMAjrjcN4oKOZHl+OMuhPwG5sOyQ==","shasum":"6a1c864d03dae6c8a2a5ae9de4da9f8f1207a66f","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1602412238.60a4079d7a81bfe07bd25788a8b2fc426cd85041.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgt7QCRA9TVsSAnZWagAAJvMP/A/oc6SSUQMqEAw6HycB\n7SWQ+G0HeYWmCJkJRY1hTtkkYmJaBxqJsrIN+GG2tGfVfeWN4ZH7gjE4wua4\nvtmAKnlRrDG3qmYGwCUQVguOvHs2TZokZi52orKfDxn/h4N9FZfgoX93W42N\nrB8PayN5ln+AAqHBmDZuOc4JTy/UPae2rYe81tSiJn7dGn/nUwRx+jtjiJP6\nKEWoT0AOJqQQrvQXAX+cE/njt/KS7sgy6HXslWhgIJx7NY7vNzqU7NSIKEGK\nDgnV4du4cEW6f3VJLypQefO2cKa/L4HsysOPj4RPz1nq9c9le2RXI7mF3TEa\nxSNRW61P/la7yNyS6hBytjSYQqrXLWn8kXB+1cRgr0J34vgJ/98kO+1edtRI\nA6kQI+t3Jnat6fK/4opQ5d/u05cfQ3raYMgNMlyPBuocoYiLV7sbuY/pqNlI\n4upOfzKyjQu/SiFaug5eTG6V/5EyoXjJK98RkuO9Nlz0O6vg77B6GQXdqSHw\n1cfGHd07BD/hB4EorGbm/rR0h9pgpsDNb+nxEixWNUNXbCQ3mxkIKhs4MQOb\nSh9KLv6GPx9HetSem+6EfCQUb6TOP2jOTGftdZx19atSq3YsSH+T2BRbALJj\nFQiXy8JLajRe3giN8K/tDIoNvK1440PQE/ILvmX/PwMm0IatBNQo91q9MBxb\ncqQm\r\n=KHsz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB8VrhcUWWPA3aaT5FLGHuw0DXxlZZKVaSJIz3upFOZ6AiBBMK1UAyigcY6X3gDwkijEMhKxi1prip+FNEX75eCEKA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1602412238.60a4079d7a81bfe07bd25788a8b2fc426cd85041_1602412239654_0.9752501485505636"},"_hasShrinkwrap":false},"2.3.0-next.1603018497.811544e8203f03c9985ee7563412c723e4c8ea54":{"name":"filedirname","version":"2.3.0-next.1603018497.811544e8203f03c9985ee7563412c723e4c8ea54","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"811544e8203f03c9985ee7563412c723e4c8ea54","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1603018497.811544e8203f03c9985ee7563412c723e4c8ea54","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-5vHi9ZcKFAWK+YPFoIZNDJTlMgZl8UW/A/kgC577rbC8n5F8Uw7GEdGf3NC5+WfKsi8WsFW12QlgkGZc+XZdXg==","shasum":"db6eae92181ee821087ee12ee7405cd1d79a4f11","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1603018497.811544e8203f03c9985ee7563412c723e4c8ea54.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjB8DCRA9TVsSAnZWagAAnIkP/2bw0I0l3v78NNcILY2Q\nMlTglX86mZNs85YquyDznYrC/hlRpOquk4jwTzY7HPXLouXDNybqaWiABjy5\nsggJUIymygBF6l2ER3/mDqpyHRwE9qLRLR1wwbvHSXzZlFAXI+MCR4kiNNUZ\nPzeEZfGAYMYkvVcM5dtopVkne4qgDrufz3i0TGGNWojdpP5EGOfaI4AJHMsP\n80IzybITTdHgtcq0QbyALGgqFruPrSRxoWWoJDaA/hqRvqVKhBGz+WXJzqE4\nE7h1h5FPIr6mapI+Ph5WRYG65zSNY/WjEJ8KktuLR7zzOFsqDE9C7Uf4xA9A\nEfo+OcxDQ+PTPM8enz/BMIfM67hSpewXjq0Qb9pBWoBdIYp5yL+pWj+8bXi9\nI5zBQxBSCr/phsl0MdIou8v1+pjsqK7HMRm+UpK2ttGFrt4BOjDn+JLVWEfe\n+4Kk9Isbrf9y7QT7F4e3LaGtNAlHSgAFNcatD6Lhwwmh5nfumUKMo/yLYCsB\nA94MtHW45g7QE7WM42slEizmVc+J4RF+Mob1iua6u4Hx6zAa82FZspMsKt5Q\nQV22X5KzduBb2Xe2ilm5uk07P9Ice7dkJB2Xy6ODGzaTS2nK0tmrM0epVwOl\nCY7c/Wgn8TiUfC4Tyg0QXp/NCPe9mysx0jOv8Oqec07Zhz/p8QQdc5A5+b3N\n2Pwk\r\n=t6WO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5CINWYmIWtSTGRIs6GXFnKHeNE30k2tjzPMjh9NrH6AiEAsbxV74A4U71VI/3s+FxkRd+ULHwjWK2ZwrMiG+ZS84U="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1603018497.811544e8203f03c9985ee7563412c723e4c8ea54_1603018498815_0.7355587295052879"},"_hasShrinkwrap":false},"2.3.0-next.1603018543.5a8cbba279a3e71444eed4f4a06cf64f175e93c1":{"name":"filedirname","version":"2.3.0-next.1603018543.5a8cbba279a3e71444eed4f4a06cf64f175e93c1","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"5a8cbba279a3e71444eed4f4a06cf64f175e93c1","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1603018543.5a8cbba279a3e71444eed4f4a06cf64f175e93c1","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-snhZTfH/Bt7dgcMPiNDVMt5fSqpfIwnf7nRYHv/u2lMt+H+KpT7sxv5XSiQ+laYWuWi+dgAjPT9ZXntDX6bu2w==","shasum":"7b9c4a9f6e12b4f6828175c9cb361274be37a908","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1603018543.5a8cbba279a3e71444eed4f4a06cf64f175e93c1.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjB8xCRA9TVsSAnZWagAAw1YP/1Bw6ih0WwpHp3Ki6po9\nCq1Qc6BcayWor/owCF7ffyuHCcXYwt1HBiyufxNyzrPrb1q+3hSnnzjQ6yZA\nl3ljYu+8JUpcfZR+k/MhXvybhftH+W/udFa4zR2IKmKO8DsrayKayMYJA4SX\nNvBryEvxlwmD063cQlFrN2VDYRuM/DjN/LV9Ye1Mc11OiX6CyJKHRyS4Lthd\nQ16fg/eAp4G1gdtlKecBk7ERyYJ5tzQ3CrpCdd/9PiOHAz5+Jnr/9pVZISjU\nEsILscjDN7ApJEvSJtQfqHOH/kmR4zE5S9k6VFpNRlNQ5rDjQjbvAHdpk4Xg\nCil1jMnJdNDNu6FTTKFhQFczNv8jRZkqx4FzKMU26n5TinUrg/FI7cv4lyOR\naJR8v028hVzXTEd6YUaTv8na7j2HQigAirNEmzUyI+1Twf2z4KtRux710mJs\nYGkHuMVslSeghB6yqeP/tNdngVfPEqwdvIAgXv6OLugGtxh+u//+8Py798/U\nJh2sNUhMnm1bvu0kMeiUSoamJd5KRhYlC1ZYcH99mzR+AK90e9ty+bwdATND\nBB4w60YYFEmPb1oSbw9zVCM4KHG5xFXQO0BnxkfuBPQplvXIjlCsRfbOd0u0\nJi4g4a4kl9Uup3Pt4HE8b57UVUV3cmhAFZyTUa1f9G+iiOIvGNx3qKSzsich\n3rXE\r\n=oUhF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRDg5Hs0A/ZX2v10ZRdWT7wBnSEilVfaN6JtXlYexEdwIgXQ8CyWMDYx+b2VQ7umQkv2DVm+ztDAsFfzXVbmF0m/4="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1603018543.5a8cbba279a3e71444eed4f4a06cf64f175e93c1_1603018545122_0.715900363951419"},"_hasShrinkwrap":false},"2.3.0-next.1603018713.4ba82e33c8103fba992e64d320095efa35c1d6c2":{"name":"filedirname","version":"2.3.0-next.1603018713.4ba82e33c8103fba992e64d320095efa35c1d6c2","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"4ba82e33c8103fba992e64d320095efa35c1d6c2","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1603018713.4ba82e33c8103fba992e64d320095efa35c1d6c2","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-RXqulzR14Tjs7ZoGVIxeKiog7jCypTqSvJcGO714Al7OE+Nz+QkHUSN+BK0pZlTs804GRVutT6u7s2NccReWsw==","shasum":"1576c0b951162b2c4afdd3d56f2b549c9c873759","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1603018713.4ba82e33c8103fba992e64d320095efa35c1d6c2.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjB/bCRA9TVsSAnZWagAAOPMQAJTZ4b6GgtlxhGZiJ5ed\n64KoR7IkaxRettxnYIp7alstUOQNSnMCA5pDDcYOT+HsjwIzAIh5c4YsFlVR\nNFxXJJoUG8QGuax2Sw4pQoifIrsg3K+xKfTpZhXYzQk+7rYXhTnDi2A5oACK\nOpGTa/QIOeAk/6fLfSq9L+jcTTaCgMR31wqsrpX5U1J7b2/tEPI6LM9vMLLV\nppgjmcP3h6nyB3+YGg7ftqnFkkLvSJjQGHg4fEesvagLM4L4VD87+KvjMrvx\nk73hcdC7Wquw1uXT/daQ++9t20qCwU6BKHJxZoZ/WAOP+6gDsr20fQxxzwS0\ni4FRHsUkgyQXEal1URdavRZkhRIGNg2/HPC8auLabOPQMk7cB9qYRNKDC3Bl\nzsSf8Wlsv+K950gocIaPg1ES7lw/T5TG3WveOy8zYOqLrfpIya2Gp6K6ej2T\n+B/ChDcccdCI/LUJfDCScUvTfAJmpeKwQAMRUA5/A0joW0YuwSbm5wvLUaUH\nuERWCjac/pxw6bUf7oDBMsNV6+0j5dJPeVQM2MZhAbNtNAVLB/9pC4zKKaa5\nvAD5CGWMv5Q+LTMHQQd+9N4evPxGKvhDYLpaLWSqg8ivlRZ4TLVuSTPVB5XK\nZw/RJQ4XxRvA2+hyMflWvGk4gTJKfVatyxsCfEoxcFpqdw/olItHfmnFY9co\nixpW\r\n=V/qV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHyMsbNVDYpsfeQ180tTYMeJo4c7cQ6w/Pkg9ZJtKYSAiEA+/wXzKGGsnj4atsCnGliAMDEOt9TIwOlyNXOvjTlR2M="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1603018713.4ba82e33c8103fba992e64d320095efa35c1d6c2_1603018715067_0.7331158723479829"},"_hasShrinkwrap":false},"2.3.0-next.1603628601.052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09":{"name":"filedirname","version":"2.3.0-next.1603628601.052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1603628601.052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-0epO3/A3vTeHP4i6/MwGX7PkKP8ibbJzHk7FcupItIvOoZ9HFzgEd11mUnwd28hDZ6ozYDUVlwTw4IvQvFmd+A==","shasum":"19fce1f256e67e9ce572a237406bd0c895c853d3","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1603628601.052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflW47CRA9TVsSAnZWagAAP/AP/0TsY4ZVsOJu2lMdesdl\nGaKzBfUsnLc92oLn0A1tFdiAZiLqFbMWJGvuXJEGV2pWjsMBB6d9WLQNEvR+\nDR0BBQwYQ103zpHSUb1pvAfJWq1yvQplEJzl7P5KP8ym3Q9G2u51cfFoas0m\nj0nxZgye/9TM+AL6+d4jX50U6EynUqm+x75qJaIc+MvPgdNbMkAGNfxEPL44\n1YNOA0O9NfskHHP2tILyuKauV568Tt16hBprwRZNULByHhkKS6/SVuHYP8wb\nM2hpEAdrRBnuqxhXzw4D2nq3NK+lS/huvDLKrdqqqrQD4gdLeON9oUvYfhEX\nqDmumr88YqXVmYXAuQu4JbNcWgC+cY7W9ZcArFV5SZwXkxlENXkxzqS/fvwH\neQzD4NBjS5NzIYeBSE2kj12XyndbQU9NHRpXgJAz0t9XmQgZ1XIVYPZLr203\nQdMjbBgj+6QjN8eI2CyUm4sIuC6K8jCU/QF3zYfzXyAd2hn4fQYPEnJ57DOs\nxwNAz2SMhT0yZ6WHEkN6N4N5bo20+m4+27mWfmWQpNuyIzEbMkM+L3OA8Geq\neM1pfETXStSTjxrsNFt61xxLMPh+/LCObUa35xUUSILsfuDOO4YzTBN7Kir7\nD6f0AaShfngg1nLZGJpvgnu9/MoKv4qv4sbkdU6v8VP/39Dj/pb6t/qXm1mM\n76oj\r\n=elM3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIYAD3hp0tUHykSNk0M27AHinsexG6kjdruNCuvrGDrQIhAIwjDKibMVutx4LieZxHceTNIR24VSpAvldr3SWzmdhQ"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1603628601.052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09_1603628602729_0.4759253033754831"},"_hasShrinkwrap":false},"2.3.0-next.1603628725.69625f86e8e29d4d3cdda082cfb9e3e87829e2af":{"name":"filedirname","version":"2.3.0-next.1603628725.69625f86e8e29d4d3cdda082cfb9e3e87829e2af","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"69625f86e8e29d4d3cdda082cfb9e3e87829e2af","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1603628725.69625f86e8e29d4d3cdda082cfb9e3e87829e2af","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-3tdH6xeqyO0w/z2uSZbRYXY1I8ZOdMnUg/6vSTctlwFRgYIEXZdMmBEdfxhUCZyvvR/GbmP5n1teoHAjX+7uyg==","shasum":"e68ee872ee73a6dd6afc4e695526f599598302c2","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1603628725.69625f86e8e29d4d3cdda082cfb9e3e87829e2af.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflW63CRA9TVsSAnZWagAAO7cP/0wek1tlmIBJGGzUoKeb\nwDMZHxtzkCgHdIffGVsrmuJx10NPGRx7hsv4DhIzWMx/g3xXImiXOeoRH+uT\nuxF7fuxkHypH87LYM/zoRAlGPplt2qhLbCYmzCWn0ZqskK81xb39MB+3nm4/\nnra8As2TO/cyz1eO//sqTwGWE1J70e4KmQeK6zZ58Va2lqj5VE3sXdecUngK\n3pMtlXCa97ZntUID+J8DLOPYUiAdEdNbmiUx0FkNRXt10mZERFvEHa4AcG04\nbEdHVATuj59MVd8jY+ugmThX+z7SX0hD6yj4QB1Z4DEPUHO+qTvmBKTSXvpy\n5TadjGcpKl3kIj3CWqHEYOvjCypP+ZB1e1K/xSebA64Gd+FyrxRmYnCvLU5C\niXdvN7+zYMk+Psh1c/syL5F+cpyton5PI9muEkXpa1/8h7RY2KlGwEjPdzMT\n432Hp4VJc55Eosf2NdFTPX4ww0DC69md6pe6WLZtsmmPLtRiRRPXIPcCiy8G\nR3zJFoQRI0LneTE/Gw/kKMyAXN0tXdUZnQ+y+wJFeP3X47u5sqw3u2WovPBm\nVLVc5MlChF9PlCGaSozgjYli48aXBmDDe6EiEWrWFruLuGGyhGBVHxDyfBdU\n8ClYrEnkJK8zPJyZXaHBIs/z8ujoq6iVDT4wqFXwSxXt5JIserAk4W0V+VW6\nJ7wY\r\n=SMoQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+s6bMfX5OdPgDzcrVz/3PrqqiQ9r6Manr8PeOegNEpAiB2Ea1c7nMacGyMM84eQmDkzCNFODNOdyWqnTU2uAhhrA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1603628725.69625f86e8e29d4d3cdda082cfb9e3e87829e2af_1603628726900_0.8475197453206309"},"_hasShrinkwrap":false},"2.3.0-next.1603628829.d0e011e7ad19b062589f012bcfe9c7ebf6de7a11":{"name":"filedirname","version":"2.3.0-next.1603628829.d0e011e7ad19b062589f012bcfe9c7ebf6de7a11","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 13 || 14 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 13 || 14","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 13 || 14 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 13 || 14","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.16.0","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","assert-helpers":"^7.2.0","eslint":"^7.8.1","eslint-config-bevry":"^3.22.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.11.0","make-deno-edition":"^1.1.1","prettier":"^2.1.1","projectz":"^2.15.0","surge":"^0.21.6","typedoc":"^0.19.0","typescript":"^4.0.2","valid-directory":"^3.3.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"d0e011e7ad19b062589f012bcfe9c7ebf6de7a11","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.3.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 13 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 13 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.3.0-next.1603628829.d0e011e7ad19b062589f012bcfe9c7ebf6de7a11","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Sd/QnU6BHNOK/aASbjI0Tb97MXYC0SI/M4XfMOpn+pg7xUwHMz3B91a+J6TLFdCoNBsg9h/WbFW24RGGfLqofw==","shasum":"81f8b91068c128290288a2b46ea6a8d27e5f017c","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.3.0-next.1603628829.d0e011e7ad19b062589f012bcfe9c7ebf6de7a11.tgz","fileCount":14,"unpackedSize":31904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflW8eCRA9TVsSAnZWagAAI0sP/18LZCb+CWUFcIJ0/vMn\negD3nXG4zVpXWNws49gUttEL6LxR9JCby9kdU70R1QgIdmzrd/Vxv8a5UQ4h\nRa84ZwlRYH+KgwRzGong0ln2RWDDdhfF83rsvpNnobVWTyOtdGIeF0yDYYzr\noEGF1LoUPfxq14fvPDsrp87V5U3t70bh9u5h/x4PcKKqlZMHDsVaKbPmROZ1\nz/rbTaeApbiQMA2l3OmcQVgSkqnQKyoBmxjE/AWTnsC26e0/Lq77GMo4sSok\nmNooFe8xGHqYcDmQw9qz80h+L5McuAo2gIoKyejrCIYYxHnoXybppeo0Ju5x\nGVtVMYlE28U5HHepgCX9hmIXGHCpog2NwXKQDn7MjYZ0LSvSAp5/OsbQHBeL\n9dQ7jfSYhEOT5dh0Mzg6uP1isq0dEVdzLvClVYrZx/WDXg/P8xY5h1gdfOFj\nsCoTgxR6Ps3WI5MuyWFiUUSIP/dQ+wcp8zG5A9Iyxln22mhCuVonEr1GQL2S\ndJ0R24XM89TLKv4sfwSIfLY/kmTxAigzFtX6LMOGOiuaccn30Wjd9Ngb4m65\nY6J2UGugjDY0O0xLpQOqNaRkrDWlmoklwisUr2/36xkLCBFDr5d0TBN6wF4t\neBWSH9lqzZl1D/p38VbnQClih81itprvYKxu/pRXV5F73igR/cS7+P2BEkah\nPX3X\r\n=EZYe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFe2CQs51Hmy5KyRXzDbrG4d8gk8QG/Fw8cYoNPxPrDDAiAi28OEUTImSoZrQQBldy7DjqcADPqyZ5k4vIcyiJqIXA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.3.0-next.1603628829.d0e011e7ad19b062589f012bcfe9c7ebf6de7a11_1603628830186_0.34075613417137385"},"_hasShrinkwrap":false},"2.4.0-next.1603935481.df2afe9f723d8e7a30196aac36938344f5502edc":{"name":"filedirname","version":"2.4.0-next.1603935481.df2afe9f723d8e7a30196aac36938344f5502edc","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"df2afe9f723d8e7a30196aac36938344f5502edc","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.4.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 15 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 15 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.4.0-next.1603935481.df2afe9f723d8e7a30196aac36938344f5502edc","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-KmwfCNENTj/1Dk5MnmoI6V7quP7YycvqHQvzkhjTImtQEqXShg9GPJMzYWrBR6jdvSu+xqZBpWzjCG1FuLnZXw==","shasum":"301f53fc2860407da5d14d3aabd88c01585c6de0","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0-next.1603935481.df2afe9f723d8e7a30196aac36938344f5502edc.tgz","fileCount":14,"unpackedSize":32102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmhz8CRA9TVsSAnZWagAAtEIP/3fXZ+h2RWxitF0EolNM\n7nny7/TeO5olyoCvXEN2H7qLqIV/d+jaa4k5Fc/KJpBNGCqQgrFYeJ0w+tJv\njq8LdpXlqS9iBJp8DHtDJOn8d11wmQwD7GBZTRE6aPuz3C8miGH5UY3a9v+H\ntgz7e2n1Ei+PXN2iBtPPqka8Wy/FtBSj71Uhj/Ayd+uRM1o6geAwFO9vnFPf\nRuj6dzPlBYG5GMVWL5gYgaLXSKh+gNz9GkKIN1+AQNwx5uEGSd1cll6jNsTi\n4hpR6dyW1FC03ggclvWbc2KuK6SNAC9KS55YK939cpQ7hdk5f6QJXMu1Q6en\nCKyz17PqDtjgmwi3imHwzdpk8HQYPtqGpvmvrK8UWEiVNQXBNtiRJektQL2Q\nBUaPnPvOuX9kQHNji5W1e8nwmn7G6sDpDfyC+p+P4Cn/hCF0KaIwUyVkg5KQ\nPI4eUl0hw3ZECvo3/IjewoBKYVspm3Ii5WKG/ajmoc0q5jdkaaLMweXhPZcF\nVcNTtNtgCE2ETWSZ7kn0vi4JqLAGqLRSeShiB8SEf9yBnnx2yOe9JREjStAW\nT8cKosoyUZfcYc4DhqWPnvUdGFbYaC4GHRhMyv4ReglJMdDOL2NUI6Mwj3EG\n4GDZTfi9oDpVxWmQhGnibmQQidypWFJUmMk98jwioWhFgfmOoySXANWT06vK\nJaF1\r\n=ys/U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQD0BGBWTC8ojBkr1j+k7OkmcDWudWLK020YbKZLO2NAIgYveVMs1TV6ARRPm90xXrK+JiVxweNrYwt+61NS6ShRs="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0-next.1603935481.df2afe9f723d8e7a30196aac36938344f5502edc_1603935484024_0.5186975698100413"},"_hasShrinkwrap":false},"2.4.0":{"name":"filedirname","version":"2.4.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"df2afe9f723d8e7a30196aac36938344f5502edc","_id":"filedirname@2.4.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-r72rpNCfFVYEF9vkZvE+tEluXQI0Mmc4oQrwYKFvYFmFpdDxIv1RkTcMYL1GLWo4y0j7pnT3F98oxp/E1YIZsA==","shasum":"3c445d2afdb6479a3fe8c005f1d9a2914f572d56","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0.tgz","fileCount":14,"unpackedSize":32045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmh0FCRA9TVsSAnZWagAA1NoP/A1gQNSu387wARGpv5Tm\nsdSN6VU/FwYb/6//BrsP+ph2gxPnzsCwEIS9LABLQLn92ujfye5nt6LneWmn\nXDGhKtLZqpjkXOwS1CINA0w3L0j/9jW/EXpNhDELfzxKDoq4IrX3qpaDDE6J\ny9w0GM46YOicMchP4j6hSyPQzZj1+2OyHPUWWAP/XakOJ4pVxNXaujpJPiA2\nMM65DiB3n0CYW3kPmwOB7j30OUSUsFjPMM1NaEQbDjZv5R+1KVziRg5aKZ5p\nvZVRpugxmCENL+IVeJyT4jFYKTWPXwNjgsX1bWuY1cDuSHkjF0Bey9kWXReN\nvXBghsdT2rAxaZUtFvf3lpRS3oCyxDAsqqP3R59fUFeI2+sDeF2vk7pN/ybX\nPGkC9Vzjwq2MzuHHtKm9GW7yQ4wEYx0fI+9g+tlYttbcGvpMdUwjc9o+Rlu7\nczeid2XAusSkYdTOqqWw4lOQBJd4cEmH+i0O0OloDCpp2nbjupocK7/bSd9x\njltNUqNL8TR1Ls/sHwCbWkskQNsRVxKLvXQIqqePRYiOte42z09JIA2lhBaT\n96g5OuGreNwWHrmYmyYBhcfqPTMAYajXmu6g1M5PsLGz/0AbjtZEJGW90Db3\n/bZZUJm0+Fzcb4pf09e/SKOEm3/pz9fPys2G8La7C68e2EB1SRupDGcryG3U\n8dPk\r\n=RZez\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmBuo2E8fSnnkk8haTwuERErB9b6xSLb7Hs9frWsSo/wIgHgnpGaGiTnRcbuBEi+TYyDhToGvjbusXoK/dz/ZX1fw="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0_1603935492827_0.6304705691051069"},"_hasShrinkwrap":false},"2.4.0-next.1604239202.3e54404b26df898e653875eccb97324b23d8d8c6":{"name":"filedirname","version":"2.4.0-next.1604239202.3e54404b26df898e653875eccb97324b23d8d8c6","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"3e54404b26df898e653875eccb97324b23d8d8c6","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.4.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 15 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 15 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.4.0-next.1604239202.3e54404b26df898e653875eccb97324b23d8d8c6","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-O/WoACTfqVFdjMPOw6IPzldEIMMF48wgMUuLmttGpeK4mBMGU7U9jNpj/QGGF1x8ToAslO6+NThzMjZgJsDS5Q==","shasum":"7f5bdb3f43f79216136bba007a75ce346cff5cb1","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0-next.1604239202.3e54404b26df898e653875eccb97324b23d8d8c6.tgz","fileCount":14,"unpackedSize":32102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnr9kCRA9TVsSAnZWagAANc8P/1ri09ZeJdPkmF+3BxV5\nMz7lu6bo99pvfLlsOmbf6pbyyZYXNT7tN0U37NMjgqOkN2xknqHdLlbGZ1t5\nlQvv7jxElcy2s9bBJVsTyEg3H4GpKyeUnGtXl35AVUqttAqo88rtOpUJGNfB\n3+ZY/cZpzrqHej9QrWCU9w4zUKL3vK2OqOWZpS1vV8uenNglAC6nfeD3AF6g\nKmFWzo5rR4NwT7NyWbn76VUR4NxJt4qSSAEQkeGQcBSd23orrbsEoZYJavwp\nrxOISCkb4/iGSuZvvS58lZcLl1Ue2LgpiesRv3+yuwBWUKiQ4LSwEA5G6YhB\ncvfE3dxGwiRCjt1UuDoOdZNRL+VSEW08jr9dsW+kNtBbFVepJQUWEG3GP7YI\nuWLI/Rb6RF//BCFCAOZ9uwuWqa0CzOV7zoxm87xBXB4uAHgehcpeLgawr0qO\nsCBby665+5j0jDIm6Nu2azy8J1ND6LXDrObDCdBJ9EfHdaD7R40kjEo83Ix/\nxXBxje3pQWNUMSBMvZ1I9LlZqXp3/DE2e5NLRDhVnNdnCj/m9EqBKEhJYnqV\nzhb5tY3CRbeODCxwoegSO3w7lOs+mLcl96WruIdqiAW0ExmWxMO104m06zJi\ndFy2VMHHtEVwKTSyUQsTjeAdBwUhi2hnZyoB/f/E5mKu2WWRRdyVupsxoDAL\nqPit\r\n=eP4I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHeM0T36nNoeYtyXvlY1p/s4YJ6EFHpoRZIqEHbObTKsAiBn0gHBZ9z2NguR9GXPvZZKpgcex5bltzFvhTNnpR4Cjg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0-next.1604239202.3e54404b26df898e653875eccb97324b23d8d8c6_1604239203593_0.38518079553829976"},"_hasShrinkwrap":false},"2.4.0-next.1604239250.dfb90beffa65be97a958569c356772a017ea0772":{"name":"filedirname","version":"2.4.0-next.1604239250.dfb90beffa65be97a958569c356772a017ea0772","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"dfb90beffa65be97a958569c356772a017ea0772","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.4.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 15 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 15 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.4.0-next.1604239250.dfb90beffa65be97a958569c356772a017ea0772","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-MbOB4axhHT+DcMKunhugukMiXWdDJ5ulRcIu2l8wIQXWhBlsnAyM5PZb/eHBh47f5yQ8DyCkU1N1FeK5PVnvDQ==","shasum":"b1ffac487d72ff3a6bae84d134fe64cb4879c09c","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0-next.1604239250.dfb90beffa65be97a958569c356772a017ea0772.tgz","fileCount":14,"unpackedSize":32102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnr+TCRA9TVsSAnZWagAAqxcP/03SspMNW4+0nCkAYX9/\nMbTHwn+wEszXrAbUTerJVDQjgyL77mjhdXTDY99hZRvxCZ4NZvpVa8yZN4RO\nj9L1FrY4E5ZPdr2vV0Icmr7xOOvV0GTMaWDVcL/qmWMY481lzYkCnVF/sjuT\nX95Y8fgJiJF4y/1lPjAKMDhVWP+yeixOogmNuKCc5R2v13k/EIwq3K+VyoG1\nCDKCgNKLVmdNJFZ+i9BFnaWE7rj8scuPW0RDMoGl+KY9YXhrW338ljzeVcQ0\n2YdVxQyrndZVwxcuALAUgPRqDyoZ3m4Y7ojkH6Yg7O4z66xw3kGk4xUhFYQI\n1KhK9rZ/jDIFyq4wvN8P+5mMpOcAtFacUtdKthaudEDzxyrs60n2mqq+bQxv\niLcs29OoN9y5+0H5wrUHEW77LKw+cTw6+apKy0L2oRV6HDeOXBdo2RRbFjZE\nDNWFjMlro0VWuRklGTtsyCtQByvAFcareJUKtM52IE8g5RxPgoUAQsYemS55\nAnVqyjiqW+Hn3xgsJ2V2d8aDKlhzE3cWbwoZmKCyvnHho7eLLLZEoIov+d0B\nWLpJjhEFNNOh9PAP7GMNAy0RXeWrWoFq+2Z7Sbhf5i3TlnjDIHpJONXdWB0L\nGpftO0ARwJBqmXVj35etGU4vy6gcECGadHd3wog0ILIc1fkghoNJ9s8+TK9R\n1+q0\r\n=1YA0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGTEEA0ilv+8UMnBlxxdd6bKtJvjh8coJME5aBP7YY3QIgSJ7Ix75kzXynfiEsYVg0iOnOvgPnEwvd4W7n+Hm8NxY="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0-next.1604239250.dfb90beffa65be97a958569c356772a017ea0772_1604239251337_0.176610399013432"},"_hasShrinkwrap":false},"2.4.0-next.1604239322.c8781a61cb1660464972bcfd106f5b9e69ec174b":{"name":"filedirname","version":"2.4.0-next.1604239322.c8781a61cb1660464972bcfd106f5b9e69ec174b","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"c8781a61cb1660464972bcfd106f5b9e69ec174b","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.4.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 15 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 15 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.4.0-next.1604239322.c8781a61cb1660464972bcfd106f5b9e69ec174b","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-GTFFi0Zqq2gD+xX1WceFB3vqX1RxXV38rtTi+2uZJw9DqBdaDWX+8JkdbKof29SwuExtGAuNGBXuVHfx1b474w==","shasum":"19db040fa633e223ad1c5654f6b046b72bdd6600","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0-next.1604239322.c8781a61cb1660464972bcfd106f5b9e69ec174b.tgz","fileCount":14,"unpackedSize":32102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnr/cCRA9TVsSAnZWagAAVDUP/2dYqas03SsPDN8dA3+t\ncsjrCUHdcFtWaSqADkDdQ5RsZJlj6qVQ6d/pmvcghP9lyy0zSf/4RX482wOP\nRJmWw8lzV3mRnewOKdGa66VjlKlLTs/mjk3jUaQVf7/BHsla73ig0nVbmi9b\nRZ5tJVrGnpK4X2dipgLgcX52tZsBSXMwwgSv60k8IXubX8TBFhUEoCzx4DlG\n/aTkTPjxBYwUUDnxyo8kN0rnAsGQajnIMd5dgX5Ryo6NR7zUAP+CxvavVmMV\ngXdiAiYrZH4hEx7x7G+3wTBIiS2mISAqhPLeQvx+F+HZtIMLXx3GQOGrAfDx\nDSZsOvpvjYxQNyHO2Y7alcAWjiVDRR6yvV3cAJJG8eNrYofaBPs2tKvBfNOm\n7iv+oYcbsUYI7GNywaorTsh3pxVNtR7AAabaGiXWDys01BIkLbITaOyY/jD9\n1hBaNq5Rx1Ou2CvPp+lI1eTEhz7qjyUf86vY6iCHJsP3Kh5wDI2rbG5rPriX\nIKEkxzqKPrt4HbzdSIL6j/rgd8LKMUzAVhWG6CS97fhpjxauTtJPAvJxKdhi\nqhsT1+ds9LcNvepG/jO+PRCMjBu9fsSwUF7WF+0iscmDo5gMUQZF/l2sfkGO\ny3z8JXxcETsdQZlC+enx32PeI/EY0n0Z6/DCTJFj7s1Tknf+hhW5TwsJU/M4\nv8vw\r\n=1xhR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDsT7T/Hgb5m/zdU49uNVCSwEwGaJuwiKxzSPNSzC3VEAiBCr8OrcxWPiRAAimBZfCHNNi26cFPd5fkS75rgphuuoQ=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0-next.1604239322.c8781a61cb1660464972bcfd106f5b9e69ec174b_1604239324231_0.4438102257196097"},"_hasShrinkwrap":false},"2.4.0-next.1604239422.baf103caf6faa26dc62fd302871dd9b53f9c8bf7":{"name":"filedirname","version":"2.4.0-next.1604239422.baf103caf6faa26dc62fd302871dd9b53f9c8bf7","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"baf103caf6faa26dc62fd302871dd9b53f9c8bf7","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.4.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 15 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 15 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.4.0-next.1604239422.baf103caf6faa26dc62fd302871dd9b53f9c8bf7","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-VCOi7AZhayi7ShU1RTRRh2lVDsiWgnyk1uBFS+gJ3S0IqVzbQW2l8bVeV83tuHFubsscMlyUTYFYOgnnu3Hn5A==","shasum":"c3088a61dbbb209b71062222d4b35fb130b92623","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0-next.1604239422.baf103caf6faa26dc62fd302871dd9b53f9c8bf7.tgz","fileCount":14,"unpackedSize":32102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnsBACRA9TVsSAnZWagAAdYgQAIxI0v0Ju64FdbbT9qX1\n+CdM/XwfgIcf6UAi+8nwa5jObV12kRAR9A3KJj426HqYT261xrUuLqaznqpn\nyYyLvxoJrM21pTXk6fHna71f4kanIY9T3Wd659SNe27+hnfyngBaeoHn4N+d\nB5M9Ej26exqsI97+wf7BonyjrxiIG1O+AQ7yI+4YW/FrmBQ4TMJXGE5yaN82\n/sCTIJgI2KD6i69TzZVyh40FBKcqJe4CRcqk4r6wiUEHvKuwQyWz0i+iK8BN\nUczruzqt3IJPWJN91nAFC93IUInUsEykHoPyICy9EK2qOk1K6k7YxjrmmL+k\n/Bl16bFgSwxjdGFiOv41PFLRrWxrkpJpVTGnUIFbt8n+nxXkrt2cR9yaKyBN\nPVai9IXNJlf/86i6RDRTHUY7xNnb7vboe71MP9ZIPr92KHfXuwalm5XCcbqE\nTheeb1Hx7WZ+ZR3Y2k2DElPVZK/GLUOgHpUiKKvNT1eJE0S3/eVR/IEfrUJx\nmQrW5WxbzC8/GZcuFIIszh2DOxuthJw5UKjHr7g+2eMJOxQRLpO+6Xu/AGiU\nndZHIP3KsClFlsRi0pCD0/CCHEWNqw9AhpDE5aR1cmQf7a9AYnAqTxQYamEM\n8RmZ3t1s87wwBoPp0NYt73jo1GdmsDW7YZrrKq6fJypxayv5HnoC+6qIAio3\nbbQ/\r\n=90/9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIElzK+EbyvK8lOR5EOP4nWr5VodwLEuR02ookvq1qUxqAiEA2iaE1sV8aWtUqC4PYMa4iXl6WlWTBwrYhCyVC66neCE="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0-next.1604239422.baf103caf6faa26dc62fd302871dd9b53f9c8bf7_1604239423704_0.4010723701520835"},"_hasShrinkwrap":false},"2.4.0-next.1604239492.1e5436369bd7cbe7041ee84c108a8f4200afc364":{"name":"filedirname","version":"2.4.0-next.1604239492.1e5436369bd7cbe7041ee84c108a8f4200afc364","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","esm","esnext","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","travisTLD":"com","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ESNext for Node.js 10 || 12 || 14 || 15 with Require for modules","directory":"edition-esnext","entry":"index.js","tags":["compiled","javascript","esnext","require"],"engines":{"node":"10 || 12 || 14 || 15","browsers":false}},{"description":"TypeScript compiled against ESNext for Node.js 12 || 14 || 15 with Import for modules","directory":"edition-esnext-esm","entry":"index.js","tags":["compiled","javascript","esnext","import"],"engines":{"node":"12 || 14 || 15","browsers":false}},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-esnext/index.js","exports":{"node":{"import":"./edition-esnext-esm/index.js","require":"./edition-esnext/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"get-current-line":"^6.2.0"},"devDependencies":{"@bevry/update-contributors":"^1.17.0","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0","assert-helpers":"^8.1.0","eslint":"^7.12.1","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^6.15.0","eslint-plugin-prettier":"^3.1.4","kava":"^5.12.0","make-deno-edition":"^1.2.0","prettier":"^2.1.2","projectz":"^2.16.0","surge":"^0.21.6","typedoc":"^0.19.2","typescript":"^4.0.5","valid-directory":"^3.4.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-esnext && npm run our:compile:edition-esnext-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-esnext":"tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && ( test ! -d edition-esnext/source || ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) ) && echo '{\"type\": \"commonjs\"}' > edition-esnext/package.json","our:compile:edition-esnext-esm":"tsc --module ESNext --target ESNext --outDir ./edition-esnext-esm --project tsconfig.json && ( test ! -d edition-esnext-esm/source || ( mv edition-esnext-esm/source edition-temp && rm -Rf edition-esnext-esm && mv edition-temp edition-esnext-esm ) ) && echo '{\"type\": \"module\"}' > edition-esnext-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-esnext/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"1e5436369bd7cbe7041ee84c108a8f4200afc364","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-travisci\"><a href=\"http://travis-ci.com/bevry/filedirname\" title=\"Check this project's build status on TravisCI\"><img src=\"https://img.shields.io/travis/com/bevry/filedirname/master.svg\" alt=\"Travis CI Build Status\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^2.4.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-esnext/index.js</code></li>\n<li><code>filedirname/edition-esnext/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 15 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-esnext-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#ES.Next\" title=\"ECMAScript Next\">ESNext</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 15 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","_id":"filedirname@2.4.0-next.1604239492.1e5436369bd7cbe7041ee84c108a8f4200afc364","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-qYpYBNwK69EdKWCHbfUu1bMJtqkiJSneDpfrf3u8sQxMWSJ/l1ki5hUU51mQwKPVnQx+r1TJXBdrhL2Rk3Vu6w==","shasum":"3e247c898ab05cce141c99b2b71b4ea91b22c503","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.4.0-next.1604239492.1e5436369bd7cbe7041ee84c108a8f4200afc364.tgz","fileCount":14,"unpackedSize":32102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnsCGCRA9TVsSAnZWagAAeS8P/250ZmtMdxsAb8/C+0G9\nxJClsrLr3nrjzIRVcmMaShPuhfOm01+Iu9koA61/BgFhXuH0kSsLF2dRnUJU\nph/BsiKEa5WECIl1SiWfhVmVmMI2ftzKhd1+kbTj8/bfMxYg1IH8jccjzFvb\nEDOrTee8Iim7MG5NRWAga3OVKxdF6z/mIslK/Ya13osVkCXaJZkMxm5GPpwU\nLPNeFZ+jXXyYNlEx8zs7YyOK9/AARKsbUOB0GsmXVNKoRNikdg38xA/Z2yOn\nKgA19qTHr07a8R48bwfA1I4dHmAeEMH5EhK4RSuZKO49gkUaIzXVx7HP92Y5\nHJQZuI8kOs59WXBJ7lhHI+wW7q1VXc2gEB+InG6Ow//+HhnM1Wqs89ZqcWer\nhHfoB736+EUdqhJ7xWyrJfZmKGqDHWXsuSVcMOH7rvqf7Is24ApCiFz7dyWx\nQuMpMASvFrmk1tjyOayExPDj8ZxtQ2rX/Upx9RfZKXOxMykvhlBDDfpmNGno\ndrGfrtkZYjDtv3NyS8SWAPfRT0VmYXVtYXGQBS2fnzLG9hlNyRmHfTejCJ3+\nQ5vRaJ/P2MxVdRHPOd1UZCgYGIceVeQnO5VAEeZEnJrxCKeW8kIKvA6HkIOX\nXn/HIvAs4p6kTdNlsEFqjH+vqAS6ESDAEN2349lhKnjif9LrhqCaJXiKGSos\nYLDW\r\n=wL1n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBAJqfV9d/MoCZ//LwY16PfxiDHCOLu5FB1iSC5gaWe/AiBbvpcUX9Lv1sBm4G9LuK3kUCs70Q/zULO/43EVIstkEA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.4.0-next.1604239492.1e5436369bd7cbe7041ee84c108a8f4200afc364_1604239493900_0.45554486153036033"},"_hasShrinkwrap":false},"2.5.0":{"name":"filedirname","version":"2.5.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2019","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 with Require for modules","directory":"edition-es2019","entry":"index.js","tags":["compiled","javascript","es2019","require"],"engines":{"node":"10 || 12 || 14","browsers":false}},{"description":"TypeScript compiled against ES2019 for Node.js 12 || 14 with Import for modules","directory":"edition-es2019-esm","entry":"index.js","tags":["compiled","javascript","es2019","import"],"engines":{"node":"12 || 14","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2019/index.js","exports":{"node":{"import":"./edition-es2019-esm/index.js","require":"./edition-es2019/index.js"}},"dependencies":{"get-current-line":"^6.3.0"},"devDependencies":{"@bevry/update-contributors":"^1.18.0","@typescript-eslint/eslint-plugin":"^4.28.5","@typescript-eslint/parser":"^4.28.5","assert-helpers":"^8.2.0","eslint":"^7.31.0","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","kava":"^5.13.0","make-deno-edition":"^1.3.0","prettier":"^2.3.2","projectz":"^2.18.0","surge":"^0.23.0","typedoc":"^0.21.4","typescript":"4.3.5","valid-directory":"^3.7.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2019 && npm run our:compile:edition-es2019-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2019":"tsc --module commonjs --target ES2019 --outDir ./edition-es2019 --project tsconfig.json && ( test ! -d edition-es2019/source || ( mv edition-es2019/source edition-temp && rm -Rf edition-es2019 && mv edition-temp edition-es2019 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es2019/package.json","our:compile:edition-es2019-esm":"tsc --module ESNext --target ES2019 --outDir ./edition-es2019-esm --project tsconfig.json && ( test ! -d edition-es2019-esm/source || ( mv edition-es2019-esm/source edition-temp && rm -Rf edition-es2019-esm && mv edition-temp edition-es2019-esm ) ) && echo '{\"type\": \"module\"}' > edition-es2019-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2019/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"82d0ee63cfae09e045cbf54009df57ec31f44fc6","_id":"filedirname@2.5.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-J2x491wRy24shKXjRXxrsNOI1oTkytrIX+qC91Gn1s15m6XLv0sn1Q56q0rvknKFoCbfJsv9BpmOohHWE2DbMg==","shasum":"02d09a56688877f2e7e4d7eb85fe641f3dddc34c","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.5.0.tgz","fileCount":13,"unpackedSize":31140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAIIACRA9TVsSAnZWagAA8nQQAIEo8uz0Ie8HWVUd+IlX\n9sipPjKIWiiU6QmvSLWpy0i4ls1RNzH1B+Rk9q/e6ItII2c4v+G3So0aFfAD\ndYe9VjY2LuMgopX3J50CFq7ptUhsSVs2VIQrLWyo+ObvRhGOnXqSOd2r8xsK\nqtXBoN76oL7bwQFws4KFl8WWouO0mVfOv8vLsjihrz3TK7U9zhnlJNKX4MNR\nlW6s7AQo6SZXjY+Q8jPGThHDeCSftTlt/YnNkYoSfglsekPaNHXsSwB0quoG\nHquMDcSUIkhH0Ns1JhqZnuaHfHk5Yt8+nnfwdjJp5uurwU0dHRxKPaIyZ4CJ\n346jBaRXpSl9ycjTBBTFSsNaI4RE9k1ae3TYP/pVtDBk01awNd+2sW+ICStD\nDKaFjmR4rtI2yi+G7GvjW5UHdPmtRSitju/AKBV82CW71GEhNtEHYdwgzwIs\nqAJzNCVDQ7TZqGBRXvIcHDajjckIxtwj96rTAaafHsTmDD7qp3tG/q7zwhtk\nRUkAWuQIzXEZd8OzGy17Oknbts63K0VhiTDG9uJ9L/pJe+Di5LDu5x35z2Iv\nGRUiAsiaJ16YoPAGpxSRYyj0+YQn/QUtQdykTqLQguoBBKCcYsywDKI8OdgO\n+y1N4EggqvMC6pc8aauH7LT74KtawO1NywO9rWAZ+EW5Bxtkak7273j/SqUD\nWrkQ\r\n=4mIZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXkqUb37Fmq9FkKaZM3MvQAW5jiIeOZAyK7qaRJTomGAiAQXKxW/E8AGhxs2qG2TTv58q36y07vqB0l3bVG55Dcgg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.5.0_1627423232708_0.06922087504281293"},"_hasShrinkwrap":false},"2.5.0-next.1627423234.82d0ee63cfae09e045cbf54009df57ec31f44fc6":{"name":"filedirname","version":"2.5.0-next.1627423234.82d0ee63cfae09e045cbf54009df57ec31f44fc6","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2019","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 with Require for modules","directory":"edition-es2019","entry":"index.js","tags":["compiled","javascript","es2019","require"],"engines":{"node":"10 || 12 || 14","browsers":false}},{"description":"TypeScript compiled against ES2019 for Node.js 12 || 14 with Import for modules","directory":"edition-es2019-esm","entry":"index.js","tags":["compiled","javascript","es2019","import"],"engines":{"node":"12 || 14","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2019/index.js","exports":{"node":{"import":"./edition-es2019-esm/index.js","require":"./edition-es2019/index.js"}},"dependencies":{"get-current-line":"^6.3.0"},"devDependencies":{"@bevry/update-contributors":"^1.18.0","@typescript-eslint/eslint-plugin":"^4.28.5","@typescript-eslint/parser":"^4.28.5","assert-helpers":"^8.2.0","eslint":"^7.31.0","eslint-config-bevry":"^3.23.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","kava":"^5.13.0","make-deno-edition":"^1.3.0","prettier":"^2.3.2","projectz":"^2.18.0","surge":"^0.23.0","typedoc":"^0.21.4","typescript":"4.3.5","valid-directory":"^3.7.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2019 && npm run our:compile:edition-es2019-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2019":"tsc --module commonjs --target ES2019 --outDir ./edition-es2019 --project tsconfig.json && ( test ! -d edition-es2019/source || ( mv edition-es2019/source edition-temp && rm -Rf edition-es2019 && mv edition-temp edition-es2019 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es2019/package.json","our:compile:edition-es2019-esm":"tsc --module ESNext --target ES2019 --outDir ./edition-es2019-esm --project tsconfig.json && ( test ! -d edition-es2019-esm/source || ( mv edition-es2019-esm/source edition-temp && rm -Rf edition-es2019-esm && mv edition-temp edition-es2019-esm ) ) && echo '{\"type\": \"module\"}' > edition-es2019-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2019/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2019/index.js</code></li>\n<li><code>filedirname/edition-es2019/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019\" title=\"ECMAScript ES2019\">ES2019</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2019-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019\" title=\"ECMAScript ES2019\">ES2019</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"82d0ee63cfae09e045cbf54009df57ec31f44fc6","_id":"filedirname@2.5.0-next.1627423234.82d0ee63cfae09e045cbf54009df57ec31f44fc6","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-BBNnZDRjr58sWPqb3Isf9AN3jKvlzMUttsP0W/Xmojm0QETrdbYCiakhxF2E7qQxqVjTaIgoqzUdY7ah8K6+mg==","shasum":"704fe3a9ed5a721d2874b0b210e9e268ded823a6","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.5.0-next.1627423234.82d0ee63cfae09e045cbf54009df57ec31f44fc6.tgz","fileCount":13,"unpackedSize":31197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAIIDCRA9TVsSAnZWagAAJDgP/25Rl6KMeNeXfzWw4n/L\nRz+ckK6kSH7dVLVCfTgL/fWpwazNSsoccbNY42bBmSlv6AFztNiSLk1/yNQw\nRkIGpyK/HFa0P7utC5lvVSZjcNwq/nOPFSxr9/OgUYw/jMUwHykxSIoZHIu8\np+32SEW0ZJMkZQURvZpi4BSTx7/fcX7cevLK4rBWEZh+aKwWLL28CUkkq2Em\nciEqvW6FjD6DUSIb29CW1qnk1yvY0mgjy1CaV4xY3MlCr6hinwIVMpdDMtOM\nfpo3drJ8yCdawqUIkQvLAkWbk+aekzgd0oy2dH4uKQpEWtLQLat7qGbvFsRH\nOrlK7AopA5ukwTzxMu+CnNsLMklCf4C3tljuUgZrZpp2poi1gEyeL/gY9jB2\n4EckVUE+/KnEBcfZgfax7x6O+TpqMdOcI+jL3WQLbqUSj1IzSztj5cXvoA4S\nci356/p8WDchveg4ZImUw6VXM4+yvdXwCEsa3FQVmfzhRydykrTpYtrVwcDF\nqrCeq5OSVkdTVuV35CHd8uIz96HfXLhhvAeJ2i/apjV1e+hXxiT9oNIyCd7P\nvm1UldqkvmfKNMxPOj0Y34il8jYGHvTxfGCa8j84nrfVkPS1GUIytiRX8UD/\n1BJNBaddMmWh9aDEYiicULYTkT7fuxAj/3uvuAEOTq/8MPw/WrGHL8TXkvoK\ni622\r\n=+ZBj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB3JNenbzt9Wa4tM/itqGSeLPCOgpGNvjgJvYRMueTpZAiEAlht5nPFnd/+MPmcbdszgRThFYHqm62ZZk7xX9bJyD28="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.5.0-next.1627423234.82d0ee63cfae09e045cbf54009df57ec31f44fc6_1627423235473_0.5384515555955343"},"_hasShrinkwrap":false},"2.6.0-next.1627506895.939060ae55cf19da3055986c9fdb799b2ce9d7f1":{"name":"filedirname","version":"2.6.0-next.1627506895.939060ae55cf19da3055986c9fdb799b2ce9d7f1","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2019","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 with Require for modules","directory":"edition-es2019","entry":"index.js","tags":["compiled","javascript","es2019","require"],"engines":{"node":"10 || 12 || 14 || 16","browsers":false}},{"description":"TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 with Import for modules","directory":"edition-es2019-esm","entry":"index.js","tags":["compiled","javascript","es2019","import"],"engines":{"node":"12 || 14 || 16","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2019/index.js","exports":{"node":{"import":"./edition-es2019-esm/index.js","require":"./edition-es2019/index.js"}},"dependencies":{"get-current-line":"^6.4.0"},"devDependencies":{"@bevry/update-contributors":"^1.19.0","@typescript-eslint/eslint-plugin":"^4.28.5","@typescript-eslint/parser":"^4.28.5","assert-helpers":"^8.2.0","eslint":"^7.31.0","eslint-config-bevry":"^3.25.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","kava":"^5.14.0","make-deno-edition":"^1.3.0","prettier":"^2.3.2","projectz":"^2.18.0","surge":"^0.23.0","typedoc":"^0.21.4","typescript":"4.3.5","valid-directory":"^3.7.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2019 && npm run our:compile:edition-es2019-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2019":"tsc --module commonjs --target ES2019 --outDir ./edition-es2019 --project tsconfig.json && ( test ! -d edition-es2019/source || ( mv edition-es2019/source edition-temp && rm -Rf edition-es2019 && mv edition-temp edition-es2019 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es2019/package.json","our:compile:edition-es2019-esm":"tsc --module ESNext --target ES2019 --outDir ./edition-es2019-esm --project tsconfig.json && ( test ! -d edition-es2019-esm/source || ( mv edition-es2019-esm/source edition-temp && rm -Rf edition-es2019-esm && mv edition-temp edition-es2019-esm ) ) && echo '{\"type\": \"module\"}' > edition-es2019-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2019/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/globals.html)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2019/index.js</code></li>\n<li><code>filedirname/edition-es2019/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019\" title=\"ECMAScript ES2019\">ES2019</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 16 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2019-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019\" title=\"ECMAScript ES2019\">ES2019</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"939060ae55cf19da3055986c9fdb799b2ce9d7f1","_id":"filedirname@2.6.0-next.1627506895.939060ae55cf19da3055986c9fdb799b2ce9d7f1","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-zK/RMGwCTf+d5yNYCLymlq5INx7/pGSu0+NkorOZMAeYxJ/oLZH/+EmxaBuYdv3y0e80q9fz5YMgOn0YNTWvNQ==","shasum":"d0afe134d5e05e92e50a82c285ab851a20a13717","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.6.0-next.1627506895.939060ae55cf19da3055986c9fdb799b2ce9d7f1.tgz","fileCount":12,"unpackedSize":29569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAcjRCRA9TVsSAnZWagAA8XsP/AzqDV4estvGQE6QrcfL\nFRlzTmyGIUOS1aklcrnygOLVOoyDGuzW4RA2sfdrsapsxCML5nevQ8mqpjMb\n8ddQmMRqujkTuelRQaIdB1WXNNEKZZJetCtqzvHwOTInClf9Fxa9xSJku8bZ\noC+lghQmvnNlLHbYoGrcpKMATofkq86ABiY+7KOgRYsp7Ru9WDGu/UNOaBPM\nJVbDQUH1lxpdZ+P4MB0i912P2OJu+bOHfKiu8kjdzpkmPbn0HzzSWYmGxyGm\nNzcJSs5lYZMHWyx1AWGllRh9nYB+fLHpS3VT6GniUK73xVbc9WkjIwJREdGw\nY1HZSYpmNeh1RXtkYSl10+u1dtPRBdHZNjUGdZZVTD429vYSCjYJAVgirocT\ns2SKEly2fxlf+bKECiVyxRUwGd0M4wdgtL9VOGVh2iWXw96n2886BvF+CnYO\nx6+JtgVHEvP2Fk1yP9Wu7OAqH+9wGxylfGu35GxZJYd9uH4WukcZj6bxRfvr\n386AHi2THnyqFI8AoxwzLG3snUd22YXPVfrh/yKOOHEkqnliAjtH8Nz7gDzk\n9VRD67nrWg2xFeF1cRcjEVI49WfFIDvWbIcUWHLeMAdmFetMmq1pfVqfPmK7\nbOcn+IoYdR7Nh4khQU0pYp1lupuULO5RUF3nr64YvHHpXMtL0VLxYFjxuHsH\n4Qmn\r\n=AbNw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCknmHp2J580Qb0hmIeD3ulSh8F6elVbA6A2tWZI8Iu4wIgMppd+k9kOuDoocjRFM4q9BmMggIy8WhMOYM3Rs28ahM="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.6.0-next.1627506895.939060ae55cf19da3055986c9fdb799b2ce9d7f1_1627506896923_0.39416545593557095"},"_hasShrinkwrap":false},"2.6.0":{"name":"filedirname","version":"2.6.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2019","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 with Require for modules","directory":"edition-es2019","entry":"index.js","tags":["compiled","javascript","es2019","require"],"engines":{"node":"10 || 12 || 14 || 16","browsers":false}},{"description":"TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 with Import for modules","directory":"edition-es2019-esm","entry":"index.js","tags":["compiled","javascript","es2019","import"],"engines":{"node":"12 || 14 || 16","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2019/index.js","exports":{"node":{"import":"./edition-es2019-esm/index.js","require":"./edition-es2019/index.js"}},"dependencies":{"get-current-line":"^6.4.0"},"devDependencies":{"@bevry/update-contributors":"^1.19.0","@typescript-eslint/eslint-plugin":"^4.28.5","@typescript-eslint/parser":"^4.28.5","assert-helpers":"^8.2.0","eslint":"^7.31.0","eslint-config-bevry":"^3.25.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","kava":"^5.14.0","make-deno-edition":"^1.3.0","prettier":"^2.3.2","projectz":"^2.18.0","surge":"^0.23.0","typedoc":"^0.21.4","typescript":"4.3.5","valid-directory":"^3.7.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2019 && npm run our:compile:edition-es2019-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2019":"tsc --module commonjs --target ES2019 --outDir ./edition-es2019 --project tsconfig.json && ( test ! -d edition-es2019/source || ( mv edition-es2019/source edition-temp && rm -Rf edition-es2019 && mv edition-temp edition-es2019 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es2019/package.json","our:compile:edition-es2019-esm":"tsc --module ESNext --target ES2019 --outDir ./edition-es2019-esm --project tsconfig.json && ( test ! -d edition-es2019-esm/source || ( mv edition-es2019-esm/source edition-temp && rm -Rf edition-es2019-esm && mv edition-temp edition-es2019-esm ) ) && echo '{\"type\": \"module\"}' > edition-es2019-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2019/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"939060ae55cf19da3055986c9fdb799b2ce9d7f1","_id":"filedirname@2.6.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-nGvBw8GOYRGMN3X2IxtwuguVSKEI3PHJSOPxXQ7IXaQGmpjk0kZx5Ipx8wzi0T2LbH4jZxv/5YUbAr2kyyvXRQ==","shasum":"c686604daff1faab2a51bd4332b548bb3b63f915","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.6.0.tgz","fileCount":12,"unpackedSize":29512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAcmeCRA9TVsSAnZWagAAx8cP/jUBl2ZydSFeNmwBiyGF\nidA8dhPMAT/Dl7DMRggMDg/BRaX9P3XxLU9AGsM9yZn7IP6PzVS3gE0fvNoJ\nT0b8AxvlyZJkEFxEDOcMk/tSI/LXkhPSFZJHueUai1JqyODtg6SnVO1HSIX4\natdd/PIS0hUzM8Z4iJk9Mm9aD8wPrdnrmVewK1YtQkJ9PNwUkwXOTFapOoGq\nEgLOJcr9t41kJ7cpDLyQMPiCjilPGJNM6wQEQSzQbkRiaMqhMIQaxv6i+VVC\naG4lk+JHU6awA6BlL5SRD+3SC7yt/+j20xexhEAb/eM9RDHKQ3gPrG2I/UKW\n72x1tV1PQAFLL24vRN86wzO8u1A589GAK2CNfiA6DNRzN7F4zG+ZWxDBZoHk\nZ7YzvRfY3Z6WUjLHQxRBB+PAisxIGmeWMnqUAGwIl5uzRYt/lnfONJJ7p/So\nUKnEfJ/kjxzaaVtKC6J5915BLlewhyRCkcBF1p2EUBxOB7YYPjQLl4S3vIJ2\nth4GjybJJChjWEFODEWhOiSjHb4CSTlxcs0lKZwK1UIYXcgdIdeLbFHzOV0y\nrnHvSYsSdiKclKYzHPZAQP7KEDgAiozQ6+t9nqNHVw1e+g+DN3pSXjlN/E/O\nUJC0vPvSKwRKUSqWL/NrTdRd0C28ZpZnFr30zhn1MTLVw89zYHkmIgquFka+\nRmXq\r\n=+EKv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJZcGFQODE5RhzHrs/rFkN1SQ4Dy8Fxob0WwLVmba4yAiBRrlX6g/f6SJkd8C2CZQMu6/ZOkGKVj1piksXkopgFhg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.6.0_1627507101914_0.3014788451607673"},"_hasShrinkwrap":false},"2.7.0-next.1627593233.88fc690194b399ff1a9a62129ad0e9770fbc9407":{"name":"filedirname","version":"2.7.0-next.1627593233.88fc690194b399ff1a9a62129ad0e9770fbc9407","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2019","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 with Require for modules","directory":"edition-es2019","entry":"index.js","tags":["compiled","javascript","es2019","require"],"engines":{"node":"10 || 12 || 14 || 16","browsers":false}},{"description":"TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 with Import for modules","directory":"edition-es2019-esm","entry":"index.js","tags":["compiled","javascript","es2019","import"],"engines":{"node":"12 || 14 || 16","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2019/index.js","exports":{"node":{"import":"./edition-es2019-esm/index.js","require":"./edition-es2019/index.js"}},"dependencies":{"get-current-line":"^6.5.0"},"devDependencies":{"@bevry/update-contributors":"^1.19.0","@typescript-eslint/eslint-plugin":"^4.28.5","@typescript-eslint/parser":"^4.28.5","assert-helpers":"^8.4.0","eslint":"^7.31.0","eslint-config-bevry":"^3.27.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","kava":"^5.14.0","make-deno-edition":"^1.3.0","prettier":"^2.3.2","projectz":"^2.21.0","surge":"^0.23.0","typedoc":"^0.21.4","typescript":"4.3.5","valid-directory":"^3.7.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2019 && npm run our:compile:edition-es2019-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2019":"tsc --module commonjs --target ES2019 --outDir ./edition-es2019 --project tsconfig.json && ( test ! -d edition-es2019/source || ( mv edition-es2019/source edition-temp && rm -Rf edition-es2019 && mv edition-temp edition-es2019 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es2019/package.json","our:compile:edition-es2019-esm":"tsc --module ESNext --target ES2019 --outDir ./edition-es2019-esm --project tsconfig.json && ( test ! -d edition-es2019-esm/source || ( mv edition-es2019-esm/source edition-temp && rm -Rf edition-es2019-esm && mv edition-temp edition-es2019-esm ) ) && echo '{\"type\": \"module\"}' > edition-es2019-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2019/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<span class=\"badge-daviddm\"><a href=\"https://david-dm.org/bevry/filedirname\" title=\"View the status of this project's dependencies on DavidDM\"><img src=\"https://img.shields.io/david/bevry/filedirname.svg\" alt=\"Dependency Status\" /></a></span>\n<span class=\"badge-daviddmdev\"><a href=\"https://david-dm.org/bevry/filedirname#info=devDependencies\" title=\"View the status of this project's development dependencies on DavidDM\"><img src=\"https://img.shields.io/david/dev/bevry/filedirname.svg\" alt=\"Dev Dependency Status\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2019/index.js</code></li>\n<li><code>filedirname/edition-es2019/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019\" title=\"ECMAScript ES2019\">ES2019</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 16 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2019-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019\" title=\"ECMAScript ES2019\">ES2019</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/MIT.html\">MIT License</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"88fc690194b399ff1a9a62129ad0e9770fbc9407","_id":"filedirname@2.7.0-next.1627593233.88fc690194b399ff1a9a62129ad0e9770fbc9407","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-1nPVWa8ONAeJEnjJvlryUONoAU5YBuTYFq793rnlLJ0J6mW0kZGvIHnAGaBbil9pJxttbYgPlUMRQTuVWMwwFg==","shasum":"7e106a87d4e6384af56d3feba796805f12f41b9a","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.7.0-next.1627593233.88fc690194b399ff1a9a62129ad0e9770fbc9407.tgz","fileCount":12,"unpackedSize":29751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAxoSCRA9TVsSAnZWagAAXuEQAKAPdyHA57/0VXGK3NU4\n9BzIJsrp9y3SQFW/tGqXbr5DunKnBmc7Jb0DGWiqox8g+HU8YMn9GTy6N+Qd\naB4Y1QakivvpN1qIf0Ov6Wyiihq4gAUZKJE3f2awzrjOm75jL48FIa0j1Dlw\nD3pQFiGRS/jgbRJO7nLk/8f3kFdOw5K0Z4nQSdNhOUsGQ0pOHc5NR0acUVP1\nMOTHLWoJ4SfdyL/i0jPSu5P8L5j+8MsgQKgF8Ghrv5KHqDQEuJdsrJY/EMkp\n14pBQFm0P4Yppw4Q3QN46JAzdf2+t4a5SfJuqZzPvUEWFWXZNfdIFSVhOdH0\n9OItlU6m5kGkewUHjxXcEXyEhcBml8OZbkg0jKSCw9mvI+DFaMZZH0R9dH78\nIF7DNtpvOqwQq8XBkPIxuM68Ld0vr+jK5L1uEqt6dRGOm+9einZOvNAs636J\n70FrQfhK85ukfsLZbNXL/1l7yYpMrTMxWQVS09uD0QSOms0K22vsZxcGGhzB\n6WRU9yGK3Of+4+f9E7jsXAszZpJYrW0wmgkXX2+4WKgrHtrSj9jx6L4FUg32\nmMpykELT86ohAtdgpCtSb7JTtGNCZK+2EU5kbjsNR2VfroRkQHBBdrOZLPYu\n344sd37U7Rg3q/DWy1QoA6E0V7ONVSr6rbsgU0CiefzjLubCELI2HcwbMfEQ\no49s\r\n=eCwu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6YFc5bHFUKqqjng4YlD9gH7BHk4GB2aCNsyesjt2ypAiEArSboo/aKp8E7gc3chFym5JRIX4MbPpkEH+NIyPgdKp0="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.7.0-next.1627593233.88fc690194b399ff1a9a62129ad0e9770fbc9407_1627593234471_0.8087840270436384"},"_hasShrinkwrap":false},"2.7.0":{"name":"filedirname","version":"2.7.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"MIT","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2019","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","daviddm","daviddmdev","---","githubsponsors","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 with Require for modules","directory":"edition-es2019","entry":"index.js","tags":["compiled","javascript","es2019","require"],"engines":{"node":"10 || 12 || 14 || 16","browsers":false}},{"description":"TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 with Import for modules","directory":"edition-es2019-esm","entry":"index.js","tags":["compiled","javascript","es2019","import"],"engines":{"node":"12 || 14 || 16","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2019/index.js","exports":{"node":{"import":"./edition-es2019-esm/index.js","require":"./edition-es2019/index.js"}},"dependencies":{"get-current-line":"^6.5.0"},"devDependencies":{"@bevry/update-contributors":"^1.19.0","@typescript-eslint/eslint-plugin":"^4.28.5","@typescript-eslint/parser":"^4.28.5","assert-helpers":"^8.4.0","eslint":"^7.31.0","eslint-config-bevry":"^3.27.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","kava":"^5.14.0","make-deno-edition":"^1.3.0","prettier":"^2.3.2","projectz":"^2.21.0","surge":"^0.23.0","typedoc":"^0.21.4","typescript":"4.3.5","valid-directory":"^3.7.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2019 && npm run our:compile:edition-es2019-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2019":"tsc --module commonjs --target ES2019 --outDir ./edition-es2019 --project tsconfig.json && ( test ! -d edition-es2019/source || ( mv edition-es2019/source edition-temp && rm -Rf edition-es2019 && mv edition-temp edition-es2019 ) ) && echo '{\"type\": \"commonjs\"}' > edition-es2019/package.json","our:compile:edition-es2019-esm":"tsc --module ESNext --target ES2019 --outDir ./edition-es2019-esm --project tsconfig.json && ( test ! -d edition-es2019-esm/source || ( mv edition-es2019-esm/source edition-temp && rm -Rf edition-es2019-esm && mv edition-temp edition-es2019-esm ) ) && echo '{\"type\": \"module\"}' > edition-es2019-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2019/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"gitHead":"88fc690194b399ff1a9a62129ad0e9770fbc9407","_id":"filedirname@2.7.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-rw4NZ0XCpm4EeBp0NK2b1WUkCm/LSDg6mJR8ywV2JYvIiwe+fimMgwVxjgd94lbmx4rOOmxybeVHsB6SRNeaXQ==","shasum":"aff98ce95590b89de5b502d51885095c01b1f36e","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.7.0.tgz","fileCount":12,"unpackedSize":29693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAxpXCRA9TVsSAnZWagAA98AP/i1fbFDs3iHZfI+S83Nc\n6bTzY7Au2bJNbbTWVZhtxNwMa8mf0LPahklaEmUsYKf9Z3hHRRdh8sJojFiC\nZXAWg5YQhwSjKJoQ4QZ9gVx7ynjizVPf3bzVDQtq6ER5D9yoxurzBfRWdZkN\nRoZLSCkUwg2w6DBiU2SJQJuRVnU3/dqzcx/QDInd35ESZ3KieNemyHvUO65Y\nNV9SghciUBEdNUosFAs+auMAye90t/HdY2IyT2JO9GVE9PpGVEkZK22gh4Wx\npSBG/aoTcqEDac8P6kmzfUFTQoZZETjsw167F10SDzyxjcj+c8xnKwrBOC5g\nV9JJf7f694UpjCTYfm4JZxS3SD/VQwQmmI6TpisD36MhtxYEx6kJ1lQDlBlS\noqZA9qTJFod3+R/tD8pM/HPTx7cyOgbHcqTLGwTJGQzrI1SQRsNpliOoHi03\nN0uEA3fzFKfFzglX+c9JXOz/fPYMvROm8CqkFQy2Z7+L5EFtzPKRi3lYqUjn\nI1+XU8wNDn/SS5ljSEeDLwu1Cy19OlWhLQRZRaszPLiV7JlOTySmcXOOSV4G\nwUwNUSyvpnkffMkPw/WULDdfuY8F6snw8w4htOZaVXqWOhM250Gz7q+ZjArx\nem/oSzJ7WUNO5LQYsxYoP6X1bXompDcSlhcBqcDuDSjfdNo7Twy91pNFvEqB\nu3mr\r\n=YckE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7bmrGCPgIqsR3SoUGt59rKj3UPg097aelaDrxWVizagIgdoolk82PbdL8APJo2l8zqKYU/0k27+l2NVEgM2OWJhM="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.7.0_1627593303755_0.6922392600476683"},"_hasShrinkwrap":false},"2.8.0-next.1698807236.eff5b7c1f2ee0a0d55487b34409f76ed63a6f017":{"name":"filedirname","version":"2.8.0-next.1698807236.eff5b7c1f2ee0a0d55487b34409f76ed63a6f017","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2017","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2017 for Node.js with Require for modules","directory":"edition-es2017","entry":"index.js","tags":["compiled","javascript","es2017","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2017 for Node.js with Import for modules","directory":"edition-es2017-esm","entry":"index.js","tags":["compiled","javascript","es2017","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2017/index.js","exports":{"node":{"import":"./edition-es2017-esm/index.js","require":"./edition-es2017/index.js"}},"dependencies":{"get-current-line":"^6.6.0"},"devDependencies":{"@bevry/update-contributors":"^1.22.0","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^6.9.1","@typescript-eslint/parser":"^6.9.1","assert-helpers":"^8.4.0","eslint":"^8.52.0","eslint-config-bevry":"^3.27.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^5.15.0","make-deno-edition":"^1.3.0","prettier":"^3.0.3","projectz":"^2.23.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.0.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2017 && npm run our:compile:edition-es2017-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2017":"tsc --module commonjs --target ES2017 --outDir ./edition-es2017 --project tsconfig.json && ( test ! -d edition-es2017/source || ( mv edition-es2017/source edition-temp && rm -Rf edition-es2017 && mv edition-temp edition-es2017 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2017/package.json","our:compile:edition-es2017-esm":"tsc --module ESNext --target ES2017 --outDir ./edition-es2017-esm --project tsconfig.json && ( test ! -d edition-es2017-esm/source || ( mv edition-es2017-esm/source edition-temp && rm -Rf edition-es2017-esm && mv edition-temp edition-es2017-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2017-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2017/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"_id":"filedirname@2.8.0-next.1698807236.eff5b7c1f2ee0a0d55487b34409f76ed63a6f017","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2017/index.js</code></li>\n<li><code>filedirname/edition-es2017/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017\" title=\"ECMAScript ES2017\">ES2017</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2017-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against <a href=\"https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017\" title=\"ECMAScript ES2017\">ES2017</a> for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"eff5b7c1f2ee0a0d55487b34409f76ed63a6f017","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-uq4hp0AvreUOxUN5R3PbTSWSbo/EjwQXZL5hJp0WwJVi66BYTHxSt/kLPlNhrGHnNaAvDDIXYSfHA3fCBVYHqw==","shasum":"c81dbc259a734144e9c3158a81e268c264b254e7","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.8.0-next.1698807236.eff5b7c1f2ee0a0d55487b34409f76ed63a6f017.tgz","fileCount":12,"unpackedSize":35785,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYeALV9W8YeHT7iLTmuGNJXcj9gqJV5ywqLMZi0nBfIQIgagdiLwPSjGKA58K0DSGOtSxojxOg5vmQlawup591ezg="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.8.0-next.1698807236.eff5b7c1f2ee0a0d55487b34409f76ed63a6f017_1698807238353_0.3364561209315293"},"_hasShrinkwrap":false},"2.8.0":{"name":"filedirname","version":"2.8.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2017","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2017 for Node.js with Require for modules","directory":"edition-es2017","entry":"index.js","tags":["compiled","javascript","es2017","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2017 for Node.js with Import for modules","directory":"edition-es2017-esm","entry":"index.js","tags":["compiled","javascript","es2017","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2017/index.js","exports":{"node":{"import":"./edition-es2017-esm/index.js","require":"./edition-es2017/index.js"}},"dependencies":{"get-current-line":"^6.6.0"},"devDependencies":{"@bevry/update-contributors":"^1.22.0","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^6.9.1","@typescript-eslint/parser":"^6.9.1","assert-helpers":"^8.4.0","eslint":"^8.52.0","eslint-config-bevry":"^3.27.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^5.15.0","make-deno-edition":"^1.3.0","prettier":"^3.0.3","projectz":"^2.23.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.0.0"},"scripts":{"our:clean":"rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2017 && npm run our:compile:edition-es2017-esm && npm run our:compile:types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2017":"tsc --module commonjs --target ES2017 --outDir ./edition-es2017 --project tsconfig.json && ( test ! -d edition-es2017/source || ( mv edition-es2017/source edition-temp && rm -Rf edition-es2017 && mv edition-temp edition-es2017 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2017/package.json","our:compile:edition-es2017-esm":"tsc --module ESNext --target ES2017 --outDir ./edition-es2017-esm --project tsconfig.json && ( test ! -d edition-es2017-esm/source || ( mv edition-es2017-esm/source edition-temp && rm -Rf edition-es2017-esm && mv edition-temp edition-es2017-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2017-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2017/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true},"_id":"filedirname@2.8.0","gitHead":"eff5b7c1f2ee0a0d55487b34409f76ed63a6f017","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-+NWRoWq4BGYSrQrvcxDVv36Duc0aJC4sD/ELWCKtLnWEBGPNM8K2zMTRQMhhY5ggCQZhlSdjQ+wCbv2l7CuHsg==","shasum":"2fcfc8f83fe9152b8bc61c77c4e51da1cbff87a7","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.8.0.tgz","fileCount":12,"unpackedSize":35727,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHilzCkXgU9xMC+DP13JFOH3/F7MvXRbFMbjWiklcVYjAiEAssIHKEtMlWNF+m6brPoZbvCNAP+LbIaBk6pWOOvbPvc="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.8.0_1698807400350_0.3202731755425219"},"_hasShrinkwrap":false},"2.9.0-next.1699906367.c96b10da61b9ed689785cb48f901286fa09ef082":{"name":"filedirname","version":"2.9.0-next.1699906367.c96b10da61b9ed689785cb48f901286fa09ef082","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2022/index.js","exports":{"node":{"import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.8.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","assert-helpers":"^11.2.0","eslint":"^8.53.0","eslint-config-bevry":"^4.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.1.0","prettier":"^3.1.0","projectz":"^2.23.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.1.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.9.0-next.1699906367.c96b10da61b9ed689785cb48f901286fa09ef082","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2022/index.js</code></li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"c96b10da61b9ed689785cb48f901286fa09ef082","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-Dkl+Lc3qHnyHBdeOj3DAX+UP8o2aynU8wRGrPNP47v0pZZ/weseq6q8be/I8Dj3rmLk5k1X8nqDcS5T/InCgbg==","shasum":"46f754004ae492d11637fd58c210cafe6700a245","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.9.0-next.1699906367.c96b10da61b9ed689785cb48f901286fa09ef082.tgz","fileCount":13,"unpackedSize":37353,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlcfxgzwXtdz/GnPbUiZa909Gc804IVp4zPjeirAR5TwIgeKymjs94Ato1VL+LBdZN1dIPRXVw/KML2OAGBnIDlrU="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.9.0-next.1699906367.c96b10da61b9ed689785cb48f901286fa09ef082_1699906368307_0.74723823947986"},"_hasShrinkwrap":false},"2.9.0":{"name":"filedirname","version":"2.9.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2022/index.js","exports":{"node":{"import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.8.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","assert-helpers":"^11.2.0","eslint":"^8.53.0","eslint-config-bevry":"^4.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.1.0","prettier":"^3.1.0","projectz":"^2.23.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.1.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.9.0","gitHead":"c96b10da61b9ed689785cb48f901286fa09ef082","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-gJn0Uxdt5T5X1K2QyNINuXKxvfC69By55xR+XnmYVJ6BBV19QWDyJtmo1O2sIlLC3P7W/ghskJPMBfS7B1WFCw==","shasum":"9d258b66a645585afbf3448fb69f892de821e3d8","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.9.0.tgz","fileCount":13,"unpackedSize":37295,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEF+d6voDhKHSqopTxIut22A45pvUcFgpRsF+mWjMJEuAiBqt9wojkBrWXmOfkwDO6MHeSTflvXwOyiXoQ6/yUCFjg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.9.0_1699906475043_0.2673367247904479"},"_hasShrinkwrap":false},"2.10.0":{"name":"filedirname","version":"2.10.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2022/index.js","exports":{"node":{"import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.9.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","assert-helpers":"^11.4.0","eslint":"^8.53.0","eslint-config-bevry":"^4.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.2.0","prettier":"^3.1.0","projectz":"^3.0.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.2.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.10.0","gitHead":"319fe6294c90a488d734122019597e192e967710","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-TKb/ta1cqYSEpq3mypdG3+yRKgMyBLidLXkc55yRwc3qwXuVlcRdT5Jw5Ne8kqFv/LHoCUxmQ3nerQZCpIIbNA==","shasum":"72e24706fe1bc56ef541ed2cc1206e9eb8fa1712","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.10.0.tgz","fileCount":13,"unpackedSize":37288,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLnOt+F86buz+zvFbbogTdOWycQbBHsWyM1LFTBNFTkAiAwW0TiZhZqgzI+iL94H0HPAEt6NNiqF6gnl90/Ca25RQ=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.10.0_1700024781675_0.19200412947942724"},"_hasShrinkwrap":false},"2.10.0-next.1700024783.319fe6294c90a488d734122019597e192e967710":{"name":"filedirname","version":"2.10.0-next.1700024783.319fe6294c90a488d734122019597e192e967710","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2022/index.js","exports":{"node":{"import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.9.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","assert-helpers":"^11.4.0","eslint":"^8.53.0","eslint-config-bevry":"^4.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.2.0","prettier":"^3.1.0","projectz":"^3.0.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.2.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.10.0-next.1700024783.319fe6294c90a488d734122019597e192e967710","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname()\nconsole.log({ __filename, __dirname })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [__filename, __dirname] = filedirname(new Error())\nconsole.log({ __filename, __dirname })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [__filename, __dirname] = filedirname(import.meta.url)\nconsole.log({ __filename, __dirname })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2022/index.js</code></li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"319fe6294c90a488d734122019597e192e967710","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-Y6HDwyo9cBQicw1X207S3Pg/DhHnRE0ACGzf3LDy7CMOMPWaKvb0e4TcKuX5dgsfLKcQKJPwBpH2tvc4i2Wx8g==","shasum":"215cdaf34624fa74d405b5ad2e5354719ad0e0df","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.10.0-next.1700024783.319fe6294c90a488d734122019597e192e967710.tgz","fileCount":13,"unpackedSize":37346,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4pePxGNOJ3qWCY7/hCFvrWr97s332wJK/ffgv+WASKAIgV6nRNtGdKRuC8Y5rjilODUKu8XE8RAAhlPLlNUn0xc0="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.10.0-next.1700024783.319fe6294c90a488d734122019597e192e967710_1700024784339_0.4352451086253333"},"_hasShrinkwrap":false},"2.10.0-next.1700102440.6be0d39d4ed275086aa914f63cd068d2da74af46":{"name":"filedirname","version":"2.10.0-next.1700102440.6be0d39d4ed275086aa914f63cd068d2da74af46","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","flattr","liberapay","buymeacoffee","opencollective","crypto","paypal","wishlist"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"balupton","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}}],"types":"./compiled-types/","type":"module","main":"edition-es2022/index.js","exports":{"node":{"import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.9.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.0","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","assert-helpers":"^11.4.0","eslint":"^8.53.0","eslint-config-bevry":"^4.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.2.0","prettier":"^3.1.0","projectz":"^3.0.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.2.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:types":"tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -rf compiled-types && mv edition-temp compiled-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.10.0-next.1700102440.6be0d39d4ed275086aa914f63cd068d2da74af46","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2022/index.js</code></li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/balupton\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-flattr\"><a href=\"https://flattr.com/profile/balupton\" title=\"Donate to this project using Flattr\"><img src=\"https://img.shields.io/badge/flattr-donate-yellow.svg\" alt=\"Flattr donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<span class=\"badge-wishlist\"><a href=\"https://bevry.me/wishlist\" title=\"Buy an item on our wishlist for us\"><img src=\"https://img.shields.io/badge/wishlist-donate-yellow.svg\" alt=\"Wishlist browse button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"6be0d39d4ed275086aa914f63cd068d2da74af46","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-jiEJewN0KVXp3WhGywhkhMToFc/j4X/VYCiEmf5NyFMesIyU8OZNIvSVZv/tQaw6o5haRDNhn3Jk4KOg7ND01w==","shasum":"c2cba31d2d8618a640e9acdd6a17d6bde2f66a67","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.10.0-next.1700102440.6be0d39d4ed275086aa914f63cd068d2da74af46.tgz","fileCount":13,"unpackedSize":37274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCF8aWb3hTzMuglmcVl3HogXQ1ckvYTMCiv1xDiEfa7qQIhAO3IstzEUgBxpYPBv58J4VepF+NDuP0dLrJA/FYkXCVt"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.10.0-next.1700102440.6be0d39d4ed275086aa914f63cd068d2da74af46_1700102441880_0.20511094640287086"},"_hasShrinkwrap":false},"2.11.0-next.1700565686.48958c762bc1a70683de1e40026114745ac960bb":{"name":"filedirname","version":"2.11.0-next.1700565686.48958c762bc1a70683de1e40026114745ac960bb","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"edition-es2022/index.js","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.10.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.3","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.2.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.4.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.11.0-next.1700565686.48958c762bc1a70683de1e40026114745ac960bb","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname</code> aliases <code>filedirname/edition-es2022/index.js</code></li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"48958c762bc1a70683de1e40026114745ac960bb","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-6THi3WDhsYqZ0ncFguGeYI6i0aYBRLLYet1jHhf0M7YzRc68zaneMXVMDTEjpUXg7BoeNck96dXFk1iHCQ9sDw==","shasum":"86c8ee40c59b53126cb2974a847ea18f184ca75a","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.11.0-next.1700565686.48958c762bc1a70683de1e40026114745ac960bb.tgz","fileCount":13,"unpackedSize":37716,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBvnvi2pbfvJJfEeIiVxAfECpdZHz57Nwy7p1s/w+fFGAiAP5XtOZoAHtgJQCba9d7UUhIKEQeHEogSo/rDjMzeTxw=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.11.0-next.1700565686.48958c762bc1a70683de1e40026114745ac960bb_1700565687851_0.47129872619179314"},"_hasShrinkwrap":false},"2.11.0":{"name":"filedirname","version":"2.11.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=10"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"edition-es2022/index.js","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","require":"./edition-es2022/index.js"}},"dependencies":{"get-current-line":"^6.10.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.3","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.2.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.4.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./edition-es2022/test.js"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@2.11.0","gitHead":"48958c762bc1a70683de1e40026114745ac960bb","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-BJziCt40D3EFDjnpBUVEjOr9VFlZZxLQAbx8QWN8akhayehjoAlAFUDp8bIQAUoOAu/rzSdPnJshgHAWK7TzKQ==","shasum":"d1acef9a0282a2a9789ab9a149a79df9dbe0ec5f","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-2.11.0.tgz","fileCount":13,"unpackedSize":37658,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWD5Ou1AUu1Tv34NcCXA+R/ZJw6aW/UmMYHOuCusEZvwIgHtnSg7wn+qJKf6uvU4o7rk6/MjxOw3FvHBMNEJcPh+g="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_2.11.0_1700565693088_0.5823443473508736"},"_hasShrinkwrap":false},"3.0.0-next.1700786833.74b2608fd4b2a83be8bf36121fde7f1c8f01df9c":{"name":"filedirname","version":"3.0.0-next.1700786833.74b2608fd4b2a83be8bf36121fde7f1c8f01df9c","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"dependencies":{"@bevry/file-url-to-path":"^1.0.0","editions":"^6.15.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.5","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.0.0-next.1700786833.74b2608fd4b2a83be8bf36121fde7f1c8f01df9c","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"74b2608fd4b2a83be8bf36121fde7f1c8f01df9c","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-ewr/v0rVrOvCbvcgCYdiHGwSy1F9D1ewfc/2Asl14EsFwdalvxA4ahZxP9MopWXOJz67/or2ivPvaX+pdetxjQ==","shasum":"2dd7dc1c869bbcfff56530771aa5b06a0dac5143","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.0.0-next.1700786833.74b2608fd4b2a83be8bf36121fde7f1c8f01df9c.tgz","fileCount":16,"unpackedSize":44122,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDFn3elcRAN4ayWx0wFAfRRIrYxYXm5uKrA2X4ftJF4AiEAjCMo9g3R1xSwuzjQTuNidHwiVOPy/Qd6sNbzfwbTy8A="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.0.0-next.1700786833.74b2608fd4b2a83be8bf36121fde7f1c8f01df9c_1700786835145_0.6722917052402735"},"_hasShrinkwrap":false},"3.0.1-next.1700795247.ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8":{"name":"filedirname","version":"3.0.1-next.1700795247.ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.15.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.5","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.0.1-next.1700795247.ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-+5UpHWMjV7ve80k+afjnh8Zv/v/pM7MxyN7QivLKD92Vl+jMkHN8PMBcsC92V+OhsWOCe5aHVABk0/Rd6tRU1Q==","shasum":"20d58a46e8cf26a3d0d19b74172b05405a7cbe47","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.0.1-next.1700795247.ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8.tgz","fileCount":16,"unpackedSize":44122,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHz6qQQoW/dx/ZIHjFgy2y9afs6fhks/54K9sRPXPW+NAiBrWqn+9KQc60+EYafvr3iBoUfbFI5hf1sxAwYp2DuGNA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.0.1-next.1700795247.ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8_1700795249768_0.02945569403888948"},"_hasShrinkwrap":false},"3.0.1-next.1700796353.262a63978c26628a3ab9cf7abeaafd75e0623e60":{"name":"filedirname","version":"3.0.1-next.1700796353.262a63978c26628a3ab9cf7abeaafd75e0623e60","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.15.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.5","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.0.1-next.1700796353.262a63978c26628a3ab9cf7abeaafd75e0623e60","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"262a63978c26628a3ab9cf7abeaafd75e0623e60","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-9iwSIfPSbBd0GlDGcOJ980Fg7Owt7uB/M7hwYg+X96r/BfW+vXLgtnTgNPMgaX2NxaUMBsxSCq8nP59xrQFbGQ==","shasum":"c5dd31ad6a0ff08af288a1f0bca173516783ea37","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.0.1-next.1700796353.262a63978c26628a3ab9cf7abeaafd75e0623e60.tgz","fileCount":16,"unpackedSize":44602,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6u1krkkC5w61uZiInmaYWtAIMD9UYKvvLkCtJp8BGdwIhAKkEcsQgK49zMA85aRGzB6UjeBO+46uPOSz8SuWtmd2z"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.0.1-next.1700796353.262a63978c26628a3ab9cf7abeaafd75e0623e60_1700796355238_0.21373518165860106"},"_hasShrinkwrap":false},"3.0.1-next.1700796924.7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394":{"name":"filedirname","version":"3.0.1-next.1700796924.7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.15.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.5","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.0.1-next.1700796924.7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-GSg5r0A8Iobd97gKnUxTnPFU8ZpDGIy91szClGZ2UbD0AnQEXTMjZqhB+c+A7bxSsPPNkB7ld4IjMrFhh6rVmg==","shasum":"3f8aa2b50a7c931a7ede416ec8d5dee57269edd3","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.0.1-next.1700796924.7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394.tgz","fileCount":16,"unpackedSize":44602,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZxVl9ls31fOPmfEFVDrOXZgenAnJzZUNFVvJjWwgjCAIgWqTcUHMkHD8Iml7sG9Y8q7Z+mfhW36IS1JDBpbcAh1U="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.0.1-next.1700796924.7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394_1700796926104_0.3891560253708686"},"_hasShrinkwrap":false},"3.0.1-next.1700797150.cc01b04a7e6b6e150e8c50f88a06fcba9e343a47":{"name":"filedirname","version":"3.0.1-next.1700797150.cc01b04a7e6b6e150e8c50f88a06fcba9e343a47","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.15.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.5","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.0.1-next.1700797150.cc01b04a7e6b6e150e8c50f88a06fcba9e343a47","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"cc01b04a7e6b6e150e8c50f88a06fcba9e343a47","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-zvJzyQJjHStcyLL4zp8QVn9ItebxhGrewKFQSmmtCpo6ywk8cJd4bf38GBT6kaE/DCHfwLmnQJswfyMSRyIBbQ==","shasum":"951237fda933e6dda42c31b806437b36caa43238","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.0.1-next.1700797150.cc01b04a7e6b6e150e8c50f88a06fcba9e343a47.tgz","fileCount":16,"unpackedSize":44602,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDn9EDD6k5XqrpbNhVcv6l20Tk/2APSVi9yfYhdN14FQIgU9SvkxlTqzbDV0XUHMUdHZtm0k8Vm5Z7TrvjotopEHk="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.0.1-next.1700797150.cc01b04a7e6b6e150e8c50f88a06fcba9e343a47_1700797151440_0.9208940506062127"},"_hasShrinkwrap":false},"3.0.1":{"name":"filedirname","version":"3.0.1","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.15.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.9.5","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.5.0","eslint":"^8.54.0","eslint-config-bevry":"^5.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.0.1","gitHead":"cc01b04a7e6b6e150e8c50f88a06fcba9e343a47","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-AYdF1WsGtpIPMpvPvxO92Ob8v0tV3SVhmDI7qf67yqdZRnb5iT+hmZ98B2oBag1nFAmEvH6dAm7nZKZrh7Jh2w==","shasum":"7f31cb7fa3ecd866d1fbb8c5c85a1ab1ddf0703c","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.0.1.tgz","fileCount":16,"unpackedSize":44544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH1yR2g9j5xMAncAhq720XSoUhCUoIe66PtX9lKYU5BACIBh+AsQt5O6l5eLNgaiOpVXCZWnRBhiyUK8pebJIc/D4"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.0.1_1700797455252_0.5243107489689489"},"_hasShrinkwrap":false},"3.1.0-next.1700841119.b207e57328cd95a2677c15233d6dfbfdda665b36":{"name":"filedirname","version":"3.1.0-next.1700841119.b207e57328cd95a2677c15233d6dfbfdda665b36","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.16.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.10.0","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.6.0","eslint":"^8.54.0","eslint-config-bevry":"^5.2.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","make-deno-edition":"^2.0.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.1.0-next.1700841119.b207e57328cd95a2677c15233d6dfbfdda665b36","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^3.1.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"b207e57328cd95a2677c15233d6dfbfdda665b36","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-LRmh062c/3v9+lr3xHasckU43z5k1KTluEPohYUXaY+HeKs4Kb7YGsF9EUFCH+3LD804aaIVbC7NEogsQbRxFg==","shasum":"a653bbe8042a27f65162597cdf836e949418824c","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.1.0-next.1700841119.b207e57328cd95a2677c15233d6dfbfdda665b36.tgz","fileCount":17,"unpackedSize":48059,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFkuX6e54th4utBSqFc/EZ2FE/zETb+FdI14YxuaVMdWAiBRDm18DAEdAl4hH49Iy6yhRCif+dtou1Ee/TVsooaJWA=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.1.0-next.1700841119.b207e57328cd95a2677c15233d6dfbfdda665b36_1700841120962_0.40798892577904833"},"_hasShrinkwrap":false},"3.1.0":{"name":"filedirname","version":"3.1.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.16.0","get-current-line":"^7.0.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.10.0","@typescript-eslint/eslint-plugin":"^6.12.0","@typescript-eslint/parser":"^6.12.0","assert-helpers":"^11.6.0","eslint":"^8.54.0","eslint-config-bevry":"^5.2.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.3.0","make-deno-edition":"^2.0.0","prettier":"^3.1.0","projectz":"^3.3.0","surge":"^0.23.1","typedoc":"^0.25.3","typescript":"5.2.2","valid-directory":"^4.5.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5"},"_id":"filedirname@3.1.0","gitHead":"b207e57328cd95a2677c15233d6dfbfdda665b36","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-sLtzIMoSiq+PRzMZnqRd3LcyHL2eh618I7fcGiIb3TFXoaHPLAB98CwUmjyq3EzcO+oS3J8ul45fa5IHB1rz1w==","shasum":"5cc17ec763b5075100200b590ec5e2e5fdc84a38","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.1.0.tgz","fileCount":17,"unpackedSize":48001,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEIoqPqV+sjBUy2U0svHL/ukEUC4EX9ezCD4u2vKQlscAiAKXJNsciQrGPrRtHKRbB+5Iy6fc9o5XTvjk2/SmsshAg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.1.0_1700841123076_0.5465626265916017"},"_hasShrinkwrap":false},"3.2.0-next.1701816320.f7411dccc6eba5c8749bf0457a35ea75beff8b36":{"name":"filedirname","version":"3.2.0-next.1701816320.f7411dccc6eba5c8749bf0457a35ea75beff8b36","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.19.0","get-current-line":"^7.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.10.3","@typescript-eslint/eslint-plugin":"^6.13.2","@typescript-eslint/parser":"^6.13.2","assert-helpers":"^11.9.0","eslint":"^8.55.0","eslint-config-bevry":"^5.3.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.5.0","make-deno-edition":"^2.0.1","prettier":"^3.1.0","projectz":"^3.4.0","typedoc":"^0.25.4","typescript":"5.3.2","valid-directory":"^4.6.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"_id":"filedirname@3.2.0-next.1701816320.f7411dccc6eba5c8749bf0457a35ea75beff8b36","readme":"<!-- TITLE/ -->\n\n<h1>filedirname</h1>\n\n<!-- /TITLE -->\n\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n<h2>Install</h2>\n\n<a href=\"https://npmjs.com\" title=\"npm is a package manager for javascript\"><h3>npm</h3></a>\n<ul>\n<li>Install: <code>npm install --save filedirname</code></li>\n<li>Import: <code>import pkg from ('filedirname')</code></li>\n<li>Require: <code>const pkg = require('filedirname').default</code></li>\n</ul>\n\n<a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\"><h3>Deno</h3></a>\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^3.2.0/edition-deno/index.ts'\n```\n\n<h3><a href=\"https://editions.bevry.me\" title=\"Editions are the best way to produce and consume packages you care about.\">Editions</a></h3>\n\n<p>This package is published with the following editions:</p>\n\n<ul><li><code>filedirname</code> aliases <code>filedirname/index.cjs</code> which uses the <a href=\"https://github.com/bevry/editions\" title=\"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>\n<li><code>filedirname/source/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-es2022/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 21 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es5/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES5 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 4 with <a href=\"https://nodejs.org/dist/latest-v5.x/docs/api/modules.html\" title=\"Node/CJS Modules\">Require</a> for modules</li>\n<li><code>filedirname/edition-es2022-esm/index.js</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled against ES2022 for <a href=\"https://nodejs.org\" title=\"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\">Node.js</a> 21 with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-types/index.d.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> compiled Types with <a href=\"https://babeljs.io/docs/learn-es2015/#modules\" title=\"ECMAScript Modules\">Import</a> for modules</li>\n<li><code>filedirname/edition-deno/index.ts</code> is <a href=\"https://www.typescriptlang.org/\" title=\"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. \">TypeScript</a> source code made to be compatible with <a href=\"https://deno.land\" title=\"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\">Deno</a></li></ul>\n\n<!-- /INSTALL -->\n\n\n<!-- HISTORY/ -->\n\n<h2>History</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/HISTORY.md#files\">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>\n\n<!-- /HISTORY -->\n\n\n<!-- CONTRIBUTE/ -->\n\n<h2>Contribute</h2>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /CONTRIBUTE -->\n\n\n<!-- BACKERS/ -->\n\n<h2>Backers</h2>\n\n<h3>Maintainers</h3>\n\nThese amazing people are maintaining this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<h3>Sponsors</h3>\n\nNo sponsors yet! Will you be the first?\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n<h3>Contributors</h3>\n\nThese amazing people have contributed code to this project:\n\n<ul><li><a href=\"https://balupton.com\">Benjamin Lupton</a> — <a href=\"https://github.com/bevry/filedirname/commits?author=balupton\" title=\"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\">view contributions</a></li></ul>\n\n<a href=\"https://github.com/bevry/filedirname/blob/master/CONTRIBUTING.md#files\">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>\n\n<!-- /BACKERS -->\n\n\n<!-- LICENSE/ -->\n\n<h2>License</h2>\n\nUnless stated otherwise all works are:\n\n<ul><li>Copyright &copy; 2020+ <a href=\"https://balupton.com\">Benjamin Lupton</a></li></ul>\n\nand licensed under:\n\n<ul><li><a href=\"http://spdx.org/licenses/Artistic-2.0.html\">Artistic License 2.0</a></li></ul>\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"f7411dccc6eba5c8749bf0457a35ea75beff8b36","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-aXMJtIPN1wypJPGjbrNok9jpA9JL5gQP5dgMJ2h2PcLM5XfwLMLuRowQ4YCTQhI7/g3mP8A6w8QrgzjIOM0hVw==","shasum":"e80e8a47d2c8ecbec02d3f745f9a6b65a0519bd0","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.2.0-next.1701816320.f7411dccc6eba5c8749bf0457a35ea75beff8b36.tgz","fileCount":17,"unpackedSize":47802,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsbNfZP00yXgQgYcfPr2rPMwDPqD/4FrhVzsucGsSUKAIhAPOE0huW0H6D1/dy5CcO7tFEWPbK9YjofNR5SHNvbXp8"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.2.0-next.1701816320.f7411dccc6eba5c8749bf0457a35ea75beff8b36_1701816323815_0.5033686632189758"},"_hasShrinkwrap":false},"3.2.0":{"name":"filedirname","version":"3.2.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","license":"Artistic-2.0","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"funding":"https://bevry.me/fund","author":{"name":"2020+ Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://github.com/balupton"}],"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.19.0","get-current-line":"^7.1.0"},"devDependencies":{"@bevry/update-contributors":"^1.23.0","@types/node":"^20.10.3","@typescript-eslint/eslint-plugin":"^6.13.2","@typescript-eslint/parser":"^6.13.2","assert-helpers":"^11.9.0","eslint":"^8.55.0","eslint-config-bevry":"^5.3.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","kava":"^7.5.0","make-deno-edition":"^2.0.1","prettier":"^3.1.0","projectz":"^3.4.0","typedoc":"^0.25.4","typescript":"5.3.2","valid-directory":"^4.6.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz","our:meta:contributors":"update-contributors","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier","our:verify:directory":"valid-directory","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"_id":"filedirname@3.2.0","gitHead":"f7411dccc6eba5c8749bf0457a35ea75beff8b36","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-2IrAgmBU8KKVz+p5aA31rlGkqsSE+A8dwQ9clGobxCdkVYxZ9fGZMO/K96CmL3U/T6dRLbXHl9oM7paL5hpTFw==","shasum":"3a11ca56bd149f2c347ce4a00be24c473658708a","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.2.0.tgz","fileCount":17,"unpackedSize":47744,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwsB5bguviO4FScpRMWQfW0bWMQSTT4379Wvj+BnihwwIhAOlZUf7DCkP+OWR7yh2OmszGUvD5Z64FWquqdzNUqEls"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.2.0_1701816475709_0.5036276672505806"},"_hasShrinkwrap":false},"3.3.0-next.1703691673.ddee2dd9c40c5166785613baa745819902944c6a":{"name":"filedirname","version":"3.3.0-next.1703691673.ddee2dd9c40c5166785613baa745819902944c6a","license":"Artistic-2.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","funding":"https://bevry.me/fund","repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"author":{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"authors":["Benjamin Lupton <b@lupton.cc> (https://balupton.com) (https://github.com/balupton): Accelerating collaborative wisdom."],"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"}],"sponsors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew): Software engineer and researcher","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa): We're Balsa, and we're building tools for builders.","Codecov <hello-codecov@sentry.io> (https://codecov.io/) (https://github.com/codecov): Empower developers with tools to improve code quality and testing.","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry): Real-time crash reporting for your web apps, mobile apps, and games.","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm): Syntax Podcast"],"donors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew)","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa)","Chad (https://opencollective.com/chad8)","Codecov <hello-codecov@sentry.io> (https://codecov.io/) (https://github.com/codecov)","entroniq (https://gitlab.com/entroniq) (https://thanks.dev/d/gl/entroniq)","Jean-Luc Geering (https://github.com/jlgeering) (https://opencollective.com/jlgeering) (https://twitter.com/jlgeering)","Michael Duane Mooring (https://bevry.me) (https://github.com/mikeumus) (https://opencollective.com/mikeumus) (https://twitter.com/mikeumus)","Mohammed Shah <shah@idk.uno> (https://github.com/smashah) (https://thanks.dev/d/gh/smashah) (https://twitter.com/smashah)","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry)","ServieJS (https://github.com/serviejs) (https://thanks.dev/d/gh/serviejs)","Skunk Team (https://skunk.team) (https://github.com/skunkteam)","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm)"],"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.20.0","get-current-line":"^7.2.0"},"devDependencies":{"@types/node":"^20.10.5","@typescript-eslint/eslint-plugin":"^6.16.0","@typescript-eslint/parser":"^6.16.0","assert-helpers":"^11.11.0","eslint":"^8.56.0","eslint-config-bevry":"^5.3.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","kava":"^7.6.0","make-deno-edition":"^2.1.0","prettier":"^3.1.1","projectz":"^4.0.0","typedoc":"^0.25.4","typescript":"5.3.3","valid-directory":"^4.7.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:docs && npm run our:meta:projectz","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:eslint && npm run our:verify:prettier","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"_id":"filedirname@3.3.0-next.1703691673.ddee2dd9c40c5166785613baa745819902944c6a","readme":"<!-- TITLE/ -->\n\n# filedirname\n\n<!-- /TITLE -->\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n## Install\n\n### [npm](https://npmjs.com \"npm is a package manager for javascript\")\n\n-   Install: `npm install --save filedirname`\n-   Import: `import pkg from ('filedirname')`\n-   Require: `const pkg = require('filedirname').default`\n\n### [Deno](https://deno.land \"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\")\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^3.3.0/edition-deno/index.ts'\n```\n### [Editions](https://editions.bevry.me \"Editions are the best way to produce and consume packages you care about.\")\n\nThis package is published with the following editions:\n-   `filedirname` aliases `filedirname/index.cjs` which uses the [Editions Autoloader](https://github.com/bevry/editions \"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\") to automatically select the correct edition for the consumer's environment\n-   `filedirname/source/index.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") source code with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-es2022/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against [ES2022](https://en.wikipedia.org/wiki/ES2022 \"ECMAScript 2022\") for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `filedirname/edition-es5/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against ES5 for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `filedirname/edition-es2022-esm/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against [ES2022](https://en.wikipedia.org/wiki/ES2022 \"ECMAScript 2022\") for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 12 || 14 || 16 || 18 || 20 || 21 with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-types/index.d.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled Types with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-deno/index.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") source code made to be compatible with [Deno](https://deno.land \"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\")\n\n<!-- /INSTALL -->\n\n<!-- HISTORY/ -->\n\n## History\n\n[Discover the release history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/filedirname/blob/HEAD/HISTORY.md#files)\n\n<!-- /HISTORY -->\n\n<!-- BACKERS/ -->\n\n## Backers\n\n### Code\n\n[Discover how to contribute via the `CONTRIBUTING.md` file.](https://github.com/bevry/filedirname/blob/HEAD/CONTRIBUTING.md#files)\n\n#### Authors\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Maintainers\n\n-   [Benjamin Lupton](https://github.com/balupton) — Accelerating collaborative wisdom.\n\n#### Contributors\n\n-   [Benjamin Lupton](https://github.com/balupton) — [view contributions](https://github.com/bevry/filedirname/commits?author=balupton \"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\")\n\n### Finances\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n#### Sponsors\n\n-   [Andrew Nesbitt](https://nesbitt.io) — Software engineer and researcher\n-   [Balsa](https://balsa.com) — We're Balsa, and we're building tools for builders.\n-   [Codecov](https://codecov.io/) — Empower developers with tools to improve code quality and testing.\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Sentry](https://sentry.io) — Real-time crash reporting for your web apps, mobile apps, and games.\n-   [Syntax](https://syntax.fm) — Syntax Podcast\n\n#### Donors\n\n-   [Andrew Nesbitt](https://nesbitt.io)\n-   [Balsa](https://balsa.com)\n-   [Chad](https://opencollective.com/chad8)\n-   [Codecov](https://codecov.io/)\n-   [entroniq](https://gitlab.com/entroniq)\n-   [Jean-Luc Geering](https://github.com/jlgeering)\n-   [Michael Duane Mooring](https://bevry.me)\n-   [Mohammed Shah](https://github.com/smashah)\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Sentry](https://sentry.io)\n-   [ServieJS](https://github.com/serviejs)\n-   [Skunk Team](https://skunk.team)\n-   [Syntax](https://syntax.fm)\n\n<!-- /BACKERS -->\n\n<!-- LICENSE/ -->\n\n## License\n\nUnless stated otherwise all works are:\n\n-   Copyright &copy; [Benjamin Lupton](https://balupton.com)\n\nand licensed under:\n\n-   [Artistic License 2.0](http://spdx.org/licenses/Artistic-2.0.html)\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"ddee2dd9c40c5166785613baa745819902944c6a","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-RLnR5c+H1489tZ1sy3ulAEx4WmFoju8cAEZNRmSIM3xFk7BixTVNPmCwCH4U5Qo3Hy9xxGM3KS0ezn5bDy89eQ==","shasum":"8f453dea8a435b9258ac8fc84b1e4e23d9732700","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.3.0-next.1703691673.ddee2dd9c40c5166785613baa745819902944c6a.tgz","fileCount":17,"unpackedSize":50130,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgx2WrSQp8XtAW6LWldk9sPcoX99cewy1FYr8gQPLHDQIgBYlsoGNIqHE5WYhMr/0oAT4bQ5d7vcvrmwcV9/PWlXk="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.3.0-next.1703691673.ddee2dd9c40c5166785613baa745819902944c6a_1703691674811_0.8667394308029275"},"_hasShrinkwrap":false},"3.3.0":{"name":"filedirname","version":"3.3.0","license":"Artistic-2.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","funding":"https://bevry.me/fund","repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"author":{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"authors":["Benjamin Lupton <b@lupton.cc> (https://balupton.com) (https://github.com/balupton): Accelerating collaborative wisdom."],"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"}],"sponsors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew): Software engineer and researcher","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa): We're Balsa, and we're building tools for builders.","Codecov <hello-codecov@sentry.io> (https://codecov.io/) (https://github.com/codecov): Empower developers with tools to improve code quality and testing.","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry): Real-time crash reporting for your web apps, mobile apps, and games.","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm): Syntax Podcast"],"donors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew)","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa)","Chad (https://opencollective.com/chad8)","Codecov <hello-codecov@sentry.io> (https://codecov.io/) (https://github.com/codecov)","entroniq (https://gitlab.com/entroniq) (https://thanks.dev/d/gl/entroniq)","Jean-Luc Geering (https://github.com/jlgeering) (https://opencollective.com/jlgeering) (https://twitter.com/jlgeering)","Michael Duane Mooring (https://bevry.me) (https://github.com/mikeumus) (https://opencollective.com/mikeumus) (https://twitter.com/mikeumus)","Mohammed Shah <shah@idk.uno> (https://github.com/smashah) (https://thanks.dev/d/gh/smashah) (https://twitter.com/smashah)","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry)","ServieJS (https://github.com/serviejs) (https://thanks.dev/d/gh/serviejs)","Skunk Team (https://skunk.team) (https://github.com/skunkteam)","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm)"],"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.20.0","get-current-line":"^7.2.0"},"devDependencies":{"@types/node":"^20.10.5","@typescript-eslint/eslint-plugin":"^6.16.0","@typescript-eslint/parser":"^6.16.0","assert-helpers":"^11.11.0","eslint":"^8.56.0","eslint-config-bevry":"^5.3.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","kava":"^7.6.0","make-deno-edition":"^2.1.0","prettier":"^3.1.1","projectz":"^4.0.0","typedoc":"^0.25.4","typescript":"5.3.3","valid-directory":"^4.7.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:docs && npm run our:meta:projectz","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:eslint && npm run our:verify:prettier","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"_id":"filedirname@3.3.0","gitHead":"ddee2dd9c40c5166785613baa745819902944c6a","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-zQRvz/o20CYlVT3l6dC9nWoFRde0s8rYTUVcZESNAYGZkznTXVBBrx9iFBZER7fyrZ0EOl7VadfgTCda49Nt1w==","shasum":"20b75f0d564a414316d27743f204f929443c1e4b","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.3.0.tgz","fileCount":17,"unpackedSize":50073,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFA/8iD6TV43fUq8azg6qfI5bw3KNACrGFkMG2t/XBcWAiAOs+T3LIw1qLD2cwH8ZYlWk71yOg3ITVAGO200VZScOg=="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.3.0_1703691693451_0.4620981725193751"},"_hasShrinkwrap":false},"3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565":{"name":"filedirname","version":"3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565","license":"Artistic-2.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","funding":"https://bevry.me/fund","repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"author":{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"authors":["Benjamin Lupton <b@lupton.cc> (https://balupton.com) (https://github.com/balupton): Accelerating collaborative wisdom."],"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"}],"sponsors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew): Software engineer and researcher","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa): We're Balsa, and we're building tools for builders.","Codecov <hello-codecov@sentry.io> (https://codecov.io) (https://github.com/codecov): Empower developers with tools to improve code quality and testing.","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry): Real-time crash reporting for your web apps, mobile apps, and games.","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm): Syntax Podcast"],"donors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew)","Armen Mkrtchian (https://mogoni.dev) (https://github.com/Armenm)","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa)","Chad (https://opencollective.com/chad8)","Codecov <hello-codecov@sentry.io> (https://codecov.io) (https://github.com/codecov)","dr.dimitru (https://veliovgroup.com) (https://github.com/dr-dimitru)","Elliott Ditman (https://elliottditman.com) (https://github.com/elliottditman)","entroniq (https://gitlab.com/entroniq) (https://thanks.dev/d/gl/entroniq)","GitHub (https://github.com/about) (https://github.com/github)","Hunter Beast (https://cryptoquick.com) (https://github.com/cryptoquick)","Jean-Luc Geering (https://github.com/jlgeering) (https://opencollective.com/jlgeering) (https://twitter.com/jlgeering)","Michael Duane Mooring (https://mdm.cc) (https://github.com/mikeumus) (https://opencollective.com/mikeumus) (https://twitter.com/mikeumus)","Michael Harry Scepaniak <mhs1.sys@gmail.com> (https://michaelscepaniak.com) (https://github.com/hispanic)","Mohammed Shah <shah@idk.uno> (https://github.com/smashah) (https://thanks.dev/d/gh/smashah) (https://twitter.com/smashah)","Mr. Henry <hello@mrhenry.be> (https://mrhenry.be) (https://github.com/mrhenry)","Nermal <nermalcat69@skiff.com> (https://arjunaditya.vercel.app) (https://github.com/nermalcat69)","Pleo (https://pleo.io) (https://github.com/pleo-io)","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Robert de Forest <guitar.robot@gmail.com> (https://github.com/rdeforest)","Sentry (https://sentry.io) (https://github.com/getsentry)","ServieJS (https://github.com/serviejs) (https://thanks.dev/d/gh/serviejs)","Skunk Team (https://skunk.team) (https://github.com/skunkteam)","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm)","WriterJohnBuck (https://github.com/WriterJohnBuck)"],"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.21.0","get-current-line":"^7.3.0"},"devDependencies":{"@types/node":"^20.10.5","@typescript-eslint/eslint-plugin":"^6.16.0","@typescript-eslint/parser":"^6.16.0","assert-helpers":"^11.12.0","eslint":"^8.56.0","eslint-config-bevry":"^5.3.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","kava":"^7.8.0","make-deno-edition":"^2.2.0","prettier":"^3.1.1","projectz":"^4.1.1","typedoc":"^0.25.4","typescript":"5.3.3","valid-directory":"^4.8.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:docs && npm run our:meta:projectz","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz --offline","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:eslint && npm run our:verify:prettier","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"_id":"filedirname@3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565","readme":"<!-- TITLE/ -->\n\n# filedirname\n\n<!-- /TITLE -->\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n## Install\n\n### [npm](https://npmjs.com \"npm is a package manager for javascript\")\n\n-   Install: `npm install --save filedirname`\n-   Import: `import pkg from ('filedirname')`\n-   Require: `const pkg = require('filedirname').default`\n\n### [Deno](https://deno.land \"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\")\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^3.4.0/edition-deno/index.ts'\n```\n### [Editions](https://editions.bevry.me \"Editions are the best way to produce and consume packages you care about.\")\n\nThis package is published with the following editions:\n-   `filedirname` aliases `filedirname/index.cjs` which uses the [Editions Autoloader](https://github.com/bevry/editions \"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\") to automatically select the correct edition for the consumer's environment\n-   `filedirname/source/index.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") source code with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-es2022/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against [ES2022](https://en.wikipedia.org/wiki/ES2022 \"ECMAScript 2022\") for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `filedirname/edition-es5/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against ES5 for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `filedirname/edition-es2022-esm/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against [ES2022](https://en.wikipedia.org/wiki/ES2022 \"ECMAScript 2022\") for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 12 || 14 || 16 || 18 || 20 || 21 with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-types/index.d.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled Types with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-deno/index.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") source code made to be compatible with [Deno](https://deno.land \"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\")\n\n<!-- /INSTALL -->\n\n<!-- HISTORY/ -->\n\n## History\n\n[Discover the release history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/filedirname/blob/HEAD/HISTORY.md#files)\n\n<!-- /HISTORY -->\n\n<!-- BACKERS/ -->\n\n## Backers\n\n### Code\n\n[Discover how to contribute via the `CONTRIBUTING.md` file.](https://github.com/bevry/filedirname/blob/HEAD/CONTRIBUTING.md#files)\n\n#### Authors\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Maintainers\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Contributors\n\n-   [Benjamin Lupton](https://github.com/balupton) — [view contributions](https://github.com/bevry/filedirname/commits?author=balupton \"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\")\n\n### Finances\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n#### Sponsors\n\n-   [Andrew Nesbitt](https://nesbitt.io) — Software engineer and researcher\n-   [Balsa](https://balsa.com) — We're Balsa, and we're building tools for builders.\n-   [Codecov](https://codecov.io) — Empower developers with tools to improve code quality and testing.\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Sentry](https://sentry.io) — Real-time crash reporting for your web apps, mobile apps, and games.\n-   [Syntax](https://syntax.fm) — Syntax Podcast\n\n#### Donors\n\n-   [Andrew Nesbitt](https://nesbitt.io)\n-   [Armen Mkrtchian](https://mogoni.dev)\n-   [Balsa](https://balsa.com)\n-   [Chad](https://opencollective.com/chad8)\n-   [Codecov](https://codecov.io)\n-   [dr.dimitru](https://veliovgroup.com)\n-   [Elliott Ditman](https://elliottditman.com)\n-   [entroniq](https://gitlab.com/entroniq)\n-   [GitHub](https://github.com/about)\n-   [Hunter Beast](https://cryptoquick.com)\n-   [Jean-Luc Geering](https://github.com/jlgeering)\n-   [Michael Duane Mooring](https://mdm.cc)\n-   [Michael Harry Scepaniak](https://michaelscepaniak.com)\n-   [Mohammed Shah](https://github.com/smashah)\n-   [Mr. Henry](https://mrhenry.be)\n-   [Nermal](https://arjunaditya.vercel.app)\n-   [Pleo](https://pleo.io)\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Robert de Forest](https://github.com/rdeforest)\n-   [Sentry](https://sentry.io)\n-   [ServieJS](https://github.com/serviejs)\n-   [Skunk Team](https://skunk.team)\n-   [Syntax](https://syntax.fm)\n-   [WriterJohnBuck](https://github.com/WriterJohnBuck)\n\n<!-- /BACKERS -->\n\n<!-- LICENSE/ -->\n\n## License\n\nUnless stated otherwise all works are:\n\n-   Copyright &copy; [Benjamin Lupton](https://balupton.com)\n\nand licensed under:\n\n-   [Artistic License 2.0](http://spdx.org/licenses/Artistic-2.0.html)\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md","gitHead":"b68d37d59419724a672212826236535019e85565","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-u/CJDYXJg97xjQ7CZpSSZHcyLl6VvwxcdFPQYh92SIS+ZzwrY2zZLKhiUUdvC7bkDUN3lIzII8AJFuuulTiNaA==","shasum":"21c87098a245a9ee79ae9a3e07b1ac99f9ba0cab","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565.tgz","fileCount":17,"unpackedSize":51503,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvSgRhHl2PbE1Ix1BQMwCSRtptBiimDAEkD9ILoZi8jQIgCG2OE2H8zPUvzr3rs2fDuWVmIF584iCvig3Khy2Oyz0="}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565_1703866745214_0.17282994377222205"},"_hasShrinkwrap":false},"3.4.0":{"name":"filedirname","version":"3.4.0","license":"Artistic-2.0","description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","funding":"https://bevry.me/fund","repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"badges":{"list":["githubworkflow","npmversion","npmdownloads","---","githubsponsors","thanksdev","patreon","liberapay","buymeacoffee","opencollective","crypto","paypal","---","discord","twitch"],"config":{"githubWorkflow":"bevry","githubSponsorsUsername":"balupton","thanksdevGithubUsername":"bevry","buymeacoffeeUsername":"balupton","cryptoURL":"https://bevry.me/crypto","flattrUsername":"balupton","liberapayUsername":"bevry","opencollectiveUsername":"bevry","patreonUsername":"bevry","paypalURL":"https://bevry.me/paypal","wishlistURL":"https://bevry.me/wishlist","discordServerID":"1147436445783560193","discordServerInvite":"nQuXddV7VP","twitchUsername":"balupton","githubUsername":"bevry","githubRepository":"filedirname","githubSlug":"bevry/filedirname","npmPackageName":"filedirname"}},"author":{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"authors":["Benjamin Lupton <b@lupton.cc> (https://balupton.com) (https://github.com/balupton): Accelerating collaborative wisdom."],"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"}],"sponsors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew): Software engineer and researcher","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa): We're Balsa, and we're building tools for builders.","Codecov <hello-codecov@sentry.io> (https://codecov.io) (https://github.com/codecov): Empower developers with tools to improve code quality and testing.","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Sentry (https://sentry.io) (https://github.com/getsentry): Real-time crash reporting for your web apps, mobile apps, and games.","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm): Syntax Podcast"],"donors":["Andrew Nesbitt (https://nesbitt.io) (https://github.com/andrew)","Armen Mkrtchian (https://mogoni.dev) (https://github.com/Armenm)","Balsa <hello@balsa.com> (https://balsa.com) (https://github.com/balsa)","Chad (https://opencollective.com/chad8)","Codecov <hello-codecov@sentry.io> (https://codecov.io) (https://github.com/codecov)","dr.dimitru (https://veliovgroup.com) (https://github.com/dr-dimitru)","Elliott Ditman (https://elliottditman.com) (https://github.com/elliottditman)","entroniq (https://gitlab.com/entroniq) (https://thanks.dev/d/gl/entroniq)","GitHub (https://github.com/about) (https://github.com/github)","Hunter Beast (https://cryptoquick.com) (https://github.com/cryptoquick)","Jean-Luc Geering (https://github.com/jlgeering) (https://opencollective.com/jlgeering) (https://twitter.com/jlgeering)","Michael Duane Mooring (https://mdm.cc) (https://github.com/mikeumus) (https://opencollective.com/mikeumus) (https://twitter.com/mikeumus)","Michael Harry Scepaniak <mhs1.sys@gmail.com> (https://michaelscepaniak.com) (https://github.com/hispanic)","Mohammed Shah <shah@idk.uno> (https://github.com/smashah) (https://thanks.dev/d/gh/smashah) (https://twitter.com/smashah)","Mr. Henry <hello@mrhenry.be> (https://mrhenry.be) (https://github.com/mrhenry)","Nermal <nermalcat69@skiff.com> (https://arjunaditya.vercel.app) (https://github.com/nermalcat69)","Pleo (https://pleo.io) (https://github.com/pleo-io)","Poonacha Medappa (https://poonachamedappa.com) (https://github.com/km-Poonacha)","Rob Morris <rob@prismatik.com.au> (https://github.com/Rob-Morris)","Robert de Forest <guitar.robot@gmail.com> (https://github.com/rdeforest)","Sentry (https://sentry.io) (https://github.com/getsentry)","ServieJS (https://github.com/serviejs) (https://thanks.dev/d/gh/serviejs)","Skunk Team (https://skunk.team) (https://github.com/skunkteam)","Syntax <scott@syntax.fm> (https://syntax.fm) (https://github.com/syntaxfm)","WriterJohnBuck (https://github.com/WriterJohnBuck)"],"engines":{"node":">=4"},"editions":[{"description":"TypeScript source code with Import for modules","directory":"source","entry":"index.ts","tags":["source","typescript","import"],"engines":false},{"description":"TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es2022","entry":"index.js","tags":["compiled","javascript","es2022","require"],"engines":{"node":"6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules","directory":"edition-es5","entry":"index.js","tags":["compiled","javascript","es5","require"],"engines":{"node":"4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules","directory":"edition-es2022-esm","entry":"index.js","tags":["compiled","javascript","es2022","import"],"engines":{"node":"12 || 14 || 16 || 18 || 20 || 21","browsers":false}},{"description":"TypeScript compiled Types with Import for modules","directory":"edition-types","entry":"index.d.ts","tags":["compiled","types","import"],"engines":false},{"description":"TypeScript source code made to be compatible with Deno","directory":"edition-deno","entry":"index.ts","tags":["typescript","import","deno"],"engines":{"deno":true,"browsers":false}}],"types":"edition-types/index.d.ts","type":"module","main":"index.cjs","exports":{"node":{"types":"./edition-types/index.d.ts","import":"./edition-es2022-esm/index.js","default":"./index.cjs","require":"./edition-es2022/index.js"}},"deno":"edition-deno/index.ts","dependencies":{"@bevry/file-url-to-path":"^1.0.1","editions":"^6.21.0","get-current-line":"^7.3.0"},"devDependencies":{"@types/node":"^20.10.5","@typescript-eslint/eslint-plugin":"^6.16.0","@typescript-eslint/parser":"^6.16.0","assert-helpers":"^11.12.0","eslint":"^8.56.0","eslint-config-bevry":"^5.3.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","kava":"^7.8.0","make-deno-edition":"^2.2.0","prettier":"^3.1.1","projectz":"^4.1.1","typedoc":"^0.25.4","typescript":"5.3.3","valid-directory":"^4.8.0"},"scripts":{"our:clean":"rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next","our:compile":"npm run our:compile:deno && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:edition-types","our:compile:deno":"make-deno-edition --attempt","our:compile:edition-es2022":"tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json","our:compile:edition-es2022-esm":"tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json","our:compile:edition-es5":"tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json","our:compile:edition-types":"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./edition-types --project tsconfig.json && ( test ! -d edition-types/source || ( mv edition-types/source edition-temp && rm -rf edition-types && mv edition-temp edition-types ) )","our:deploy":"printf '%s\n' 'no need for this project'","our:meta":"npm run our:meta:docs && npm run our:meta:projectz","our:meta:docs":"npm run our:meta:docs:typedoc","our:meta:docs:typedoc":"rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source","our:meta:projectz":"projectz --offline","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep \"v$npm_package_version\" || (printf '%s\n' \"add a changelog entry for v$npm_package_version\" && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (printf '%s\n' 'proper changelog entry not found' && exit -1) && git tag \"v$npm_package_version\" -am \"$MESSAGE\"","our:setup":"npm run our:setup:install","our:setup:install":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:eslint && npm run our:verify:prettier","our:verify:eslint":"eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source","our:verify:prettier":"prettier --write .","test":"node ./test.cjs"},"eslintConfig":{"extends":["bevry"]},"prettier":{"semi":false,"singleQuote":true,"trailingComma":"es5","endOfLine":"lf"},"_id":"filedirname@3.4.0","gitHead":"b68d37d59419724a672212826236535019e85565","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-wD4qJFZ7V75B6LUXjGd5pNlBSl9uVhwLckq/2R1T0kQaTC0LvOT6unN4dUIb5gzzLUm7AZqZWrUbooiNIysmlw==","shasum":"4607eff03ee2f99674de6c2fbf6481fb2fcce298","tarball":"https://registry.npmjs.org/filedirname/-/filedirname-3.4.0.tgz","fileCount":17,"unpackedSize":51446,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVLs9DrYv02SySP6Z8P1TYqXWHAAtu/lHmJWTCnYu0VAIhALlDgCfVYPt/A1IEisRaAnTetc8xhm610V04RpmqLgKy"}]},"_npmUser":{"name":"bevryme","email":"us@bevry.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/filedirname_3.4.0_1703866809756_0.8544280514581859"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-17T23:41:24.032Z","1.0.0":"2020-08-17T23:41:24.175Z","modified":"2023-12-29T16:20:10.216Z","1.0.0-next.1597707739.352dd87c83812e8b39f571634d63b7c973fd171b":"2020-08-17T23:42:21.021Z","1.0.1-next.1597710871.9f1f87def92801b822fd9897d05dffa51be91252":"2020-08-18T00:34:33.015Z","1.0.1":"2020-08-18T00:35:46.839Z","1.0.1-next.1597778116.838dd390e235d60a29f21009433b483fba9de92d":"2020-08-18T19:15:18.167Z","1.0.2-next.1598842815.65805c4f67ab124ea008b818e5aaa853e34e06e2":"2020-08-31T03:00:16.436Z","1.0.2":"2020-08-31T03:00:29.530Z","1.0.2-next.1599077121.ef0c1a77ba07a0538d656bf31e095128003fc043":"2020-09-02T20:05:23.550Z","2.0.0-next.1599104301.8fbc343544a299a05312d2042ee708297307a6bd":"2020-09-03T03:38:22.712Z","2.0.0":"2020-09-03T03:38:39.205Z","2.1.0-next.1599189896.2cd6ab6c76a0db46cd6374b7233542e94db41d3d":"2020-09-04T03:24:57.701Z","2.1.0":"2020-09-04T03:25:10.294Z","2.2.0-next.1599190318.e41c89014ade8980957e1f9ab4a55ac24afc8e83":"2020-09-04T03:31:59.750Z","2.2.0":"2020-09-04T03:33:22.967Z","2.2.0-next.1599201983.e28a23c8e77f640ceff206460889328e649e5fd5":"2020-09-04T06:46:25.073Z","2.3.0-next.1599214217.3aeb710ad33f10ece78cffd237f30d86765c0ba8":"2020-09-04T10:10:19.421Z","2.3.0":"2020-09-04T10:11:32.709Z","2.3.0-next.1599396631.7ade991da02ef3ca4e334f9687b50d0377622cd6":"2020-09-06T12:50:32.730Z","2.3.0-next.1599398412.74a6aec619095c222ec1450c78f6a01743da7664":"2020-09-06T13:20:13.695Z","2.3.0-next.1599398597.41dc8f536045a8c2c003656581b5ca7104e853f3":"2020-09-06T13:23:19.209Z","2.3.0-next.1599994051.e0ff04b009b291b96b3f7917fae01adce10968aa":"2020-09-13T10:47:33.089Z","2.3.0-next.1599996599.aa88d6815f45c78f5836c01ce68304bc00125287":"2020-09-13T11:30:13.698Z","2.3.0-next.1599999300.16a2c37fbcf9066fe3c244fd07318b74f090ef61":"2020-09-13T12:15:02.437Z","2.3.0-next.1600604579.12e72d652f758c642a1fa76620c3464ceafde607":"2020-09-20T12:23:00.387Z","2.3.0-next.1600604636.90b6cbebb2c0a6b811aa16dcf72526f2341e4590":"2020-09-20T12:23:57.958Z","2.3.0-next.1600607202.ae5d40b60a5a6f8e46abeb1613befa6af0bba1bd":"2020-09-20T13:06:44.291Z","2.3.0-next.1601212604.053c3b513fb2edf4178b3269b2786eab66ae72d9":"2020-09-27T13:16:45.501Z","2.3.0-next.1601212647.7859e6aa8b6a1dfcc922b9ca5da7f466a1ecf9aa":"2020-09-27T13:17:29.136Z","2.3.0-next.1601212693.22aa6f0e40aafb5312435b1e7aed95dc8258cb0c":"2020-09-27T13:18:14.465Z","2.3.0-next.1601212736.c27468b7262de698e163d10cebb38aa7918e3ef8":"2020-09-27T13:18:58.172Z","2.3.0-next.1601800005.cad7529601701afc7bccb79ed40cc87524f20c13":"2020-10-04T08:26:46.775Z","2.3.0-next.1601800059.9dac77ec801f29422eb77bbca80bb35d67bec40e":"2020-10-04T08:27:51.183Z","2.3.0-next.1601800099.c2c8da385f3e899bd23a62a932305365159dc288":"2020-10-04T08:28:20.475Z","2.3.0-next.1601800149.b6162149fcb0a509e45bd50003cd8655020df872":"2020-10-04T08:29:10.900Z","2.3.0-next.1602412150.d8552e019998058a04da358bda865785ecd39d4e":"2020-10-11T10:29:11.893Z","2.3.0-next.1602412199.6140983d15503f3ee2976a1b3d8015897f8fbd57":"2020-10-11T10:30:01.189Z","2.3.0-next.1602412238.60a4079d7a81bfe07bd25788a8b2fc426cd85041":"2020-10-11T10:30:39.827Z","2.3.0-next.1603018497.811544e8203f03c9985ee7563412c723e4c8ea54":"2020-10-18T10:54:58.962Z","2.3.0-next.1603018543.5a8cbba279a3e71444eed4f4a06cf64f175e93c1":"2020-10-18T10:55:45.290Z","2.3.0-next.1603018713.4ba82e33c8103fba992e64d320095efa35c1d6c2":"2020-10-18T10:58:35.185Z","2.3.0-next.1603628601.052aaaf2e50110ecba7d1e3a9ebe4b85fa1b0b09":"2020-10-25T12:23:22.876Z","2.3.0-next.1603628725.69625f86e8e29d4d3cdda082cfb9e3e87829e2af":"2020-10-25T12:25:27.008Z","2.3.0-next.1603628829.d0e011e7ad19b062589f012bcfe9c7ebf6de7a11":"2020-10-25T12:27:10.374Z","2.4.0-next.1603935481.df2afe9f723d8e7a30196aac36938344f5502edc":"2020-10-29T01:38:04.177Z","2.4.0":"2020-10-29T01:38:12.967Z","2.4.0-next.1604239202.3e54404b26df898e653875eccb97324b23d8d8c6":"2020-11-01T14:00:03.756Z","2.4.0-next.1604239250.dfb90beffa65be97a958569c356772a017ea0772":"2020-11-01T14:00:51.455Z","2.4.0-next.1604239322.c8781a61cb1660464972bcfd106f5b9e69ec174b":"2020-11-01T14:02:04.394Z","2.4.0-next.1604239422.baf103caf6faa26dc62fd302871dd9b53f9c8bf7":"2020-11-01T14:03:43.853Z","2.4.0-next.1604239492.1e5436369bd7cbe7041ee84c108a8f4200afc364":"2020-11-01T14:04:54.024Z","2.5.0":"2021-07-27T22:00:32.847Z","2.5.0-next.1627423234.82d0ee63cfae09e045cbf54009df57ec31f44fc6":"2021-07-27T22:00:35.604Z","2.6.0-next.1627506895.939060ae55cf19da3055986c9fdb799b2ce9d7f1":"2021-07-28T21:14:57.069Z","2.6.0":"2021-07-28T21:18:22.033Z","2.7.0-next.1627593233.88fc690194b399ff1a9a62129ad0e9770fbc9407":"2021-07-29T21:13:54.620Z","2.7.0":"2021-07-29T21:15:03.930Z","2.8.0-next.1698807236.eff5b7c1f2ee0a0d55487b34409f76ed63a6f017":"2023-11-01T02:53:58.624Z","2.8.0":"2023-11-01T02:56:40.522Z","2.9.0-next.1699906367.c96b10da61b9ed689785cb48f901286fa09ef082":"2023-11-13T20:12:48.504Z","2.9.0":"2023-11-13T20:14:35.246Z","2.10.0":"2023-11-15T05:06:21.842Z","2.10.0-next.1700024783.319fe6294c90a488d734122019597e192e967710":"2023-11-15T05:06:24.548Z","2.10.0-next.1700102440.6be0d39d4ed275086aa914f63cd068d2da74af46":"2023-11-16T02:40:42.060Z","2.11.0-next.1700565686.48958c762bc1a70683de1e40026114745ac960bb":"2023-11-21T11:21:28.023Z","2.11.0":"2023-11-21T11:21:33.297Z","3.0.0-next.1700786833.74b2608fd4b2a83be8bf36121fde7f1c8f01df9c":"2023-11-24T00:47:15.321Z","3.0.1-next.1700795247.ba7fefd2886a7713a07b9b3f1a42a7acda92b4d8":"2023-11-24T03:07:29.997Z","3.0.1-next.1700796353.262a63978c26628a3ab9cf7abeaafd75e0623e60":"2023-11-24T03:25:55.439Z","3.0.1-next.1700796924.7b1f3f934e826b4d1e3eef3f9cd3e390ccf8e394":"2023-11-24T03:35:26.360Z","3.0.1-next.1700797150.cc01b04a7e6b6e150e8c50f88a06fcba9e343a47":"2023-11-24T03:39:11.631Z","3.0.1":"2023-11-24T03:44:15.454Z","3.1.0-next.1700841119.b207e57328cd95a2677c15233d6dfbfdda665b36":"2023-11-24T15:52:01.120Z","3.1.0":"2023-11-24T15:52:03.255Z","3.2.0-next.1701816320.f7411dccc6eba5c8749bf0457a35ea75beff8b36":"2023-12-05T22:45:23.991Z","3.2.0":"2023-12-05T22:47:55.971Z","3.3.0-next.1703691673.ddee2dd9c40c5166785613baa745819902944c6a":"2023-12-27T15:41:15.045Z","3.3.0":"2023-12-27T15:41:33.625Z","3.4.0-next.1703866725.b68d37d59419724a672212826236535019e85565":"2023-12-29T16:19:05.442Z","3.4.0":"2023-12-29T16:20:09.992Z"},"maintainers":[{"name":"bevryme","email":"us@bevry.me"}],"description":"Fetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)","homepage":"https://github.com/bevry/filedirname","keywords":["__dirname","__filename","commonjs","deno","deno-edition","deno-entry","denoland","directory","dirname","ecmascript","es2022","es5","esm","export-default","file","filename","import","mjs","modules","node","path","paths","polyfill","typed","types","typescript"],"repository":{"type":"git","url":"git+https://github.com/bevry/filedirname.git"},"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"}],"author":{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"https://balupton.com"},"bugs":{"url":"https://github.com/bevry/filedirname/issues"},"license":"Artistic-2.0","readme":"<!-- TITLE/ -->\n\n# filedirname\n\n<!-- /TITLE -->\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/filedirname/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/filedirname/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/filedirname.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/filedirname\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/filedirname.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n<!-- DESCRIPTION/ -->\n\nFetch the current file and directory path, no matter your environment (Deno, Node.js, Web Browsers, ESM, CJS)\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.filedirname.bevry.surge.sh/docs/)\n\n### Without Arguments\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) enviroments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname()\nconsole.log({ file, dir })\n```\n\n### Via Error\n\nThe following works for ESM (ECMAScript Modules) and CJS (CommonJS Modules) environments:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n// for commonjs\nconst filedirname = require('filedirname').default\n\n// usage\nconst [file, dir] = filedirname(new Error())\nconsole.log({ file, dir })\n```\n\n### Via `import.meta.url`\n\nThe following works only for ESM (ECMAScript Modules) environments and is the quickest solution:\n\n```javascript\n// for deno\nimport filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'\n// for web browsers\nimport filedirname from 'https://unpkg.com/filedirname'\n// for node.js\nimport filedirname from 'filedirname'\n\n// usage\nconst [file, dir] = filedirname(import.meta.url)\nconsole.log({ file, dir })\n```\n\n<!-- INSTALL/ -->\n\n## Install\n\n### [npm](https://npmjs.com \"npm is a package manager for javascript\")\n\n-   Install: `npm install --save filedirname`\n-   Import: `import pkg from ('filedirname')`\n-   Require: `const pkg = require('filedirname').default`\n\n### [Deno](https://deno.land \"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js\")\n\n``` typescript\nimport pkg from 'https://unpkg.com/filedirname@^3.4.0/edition-deno/index.ts'\n```\n### [Editions](https://editions.bevry.me \"Editions are the best way to produce and consume packages you care about.\")\n\nThis package is published with the following editions:\n-   `filedirname` aliases `filedirname/index.cjs` which uses the [Editions Autoloader](https://github.com/bevry/editions \"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\") to automatically select the correct edition for the consumer's environment\n-   `filedirname/source/index.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") source code with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-es2022/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against [ES2022](https://en.wikipedia.org/wiki/ES2022 \"ECMAScript 2022\") for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `filedirname/edition-es5/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against ES5 for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `filedirname/edition-es2022-esm/index.js` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled against [ES2022](https://en.wikipedia.org/wiki/ES2022 \"ECMAScript 2022\") for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 12 || 14 || 16 || 18 || 20 || 21 with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-types/index.d.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") compiled Types with [Import](https://babeljs.io/docs/learn-es2015/#modules \"ECMAScript Modules\") for modules\n-   `filedirname/edition-deno/index.ts` is [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\") source code made to be compatible with [Deno](https://deno.land \"Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js\")\n\n<!-- /INSTALL -->\n\n<!-- HISTORY/ -->\n\n## History\n\n[Discover the release history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/filedirname/blob/HEAD/HISTORY.md#files)\n\n<!-- /HISTORY -->\n\n<!-- BACKERS/ -->\n\n## Backers\n\n### Code\n\n[Discover how to contribute via the `CONTRIBUTING.md` file.](https://github.com/bevry/filedirname/blob/HEAD/CONTRIBUTING.md#files)\n\n#### Authors\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Maintainers\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Contributors\n\n-   [Benjamin Lupton](https://github.com/balupton) — [view contributions](https://github.com/bevry/filedirname/commits?author=balupton \"View the GitHub contributions of Benjamin Lupton on repository bevry/filedirname\")\n\n### Finances\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n#### Sponsors\n\n-   [Andrew Nesbitt](https://nesbitt.io) — Software engineer and researcher\n-   [Balsa](https://balsa.com) — We're Balsa, and we're building tools for builders.\n-   [Codecov](https://codecov.io) — Empower developers with tools to improve code quality and testing.\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Sentry](https://sentry.io) — Real-time crash reporting for your web apps, mobile apps, and games.\n-   [Syntax](https://syntax.fm) — Syntax Podcast\n\n#### Donors\n\n-   [Andrew Nesbitt](https://nesbitt.io)\n-   [Armen Mkrtchian](https://mogoni.dev)\n-   [Balsa](https://balsa.com)\n-   [Chad](https://opencollective.com/chad8)\n-   [Codecov](https://codecov.io)\n-   [dr.dimitru](https://veliovgroup.com)\n-   [Elliott Ditman](https://elliottditman.com)\n-   [entroniq](https://gitlab.com/entroniq)\n-   [GitHub](https://github.com/about)\n-   [Hunter Beast](https://cryptoquick.com)\n-   [Jean-Luc Geering](https://github.com/jlgeering)\n-   [Michael Duane Mooring](https://mdm.cc)\n-   [Michael Harry Scepaniak](https://michaelscepaniak.com)\n-   [Mohammed Shah](https://github.com/smashah)\n-   [Mr. Henry](https://mrhenry.be)\n-   [Nermal](https://arjunaditya.vercel.app)\n-   [Pleo](https://pleo.io)\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Robert de Forest](https://github.com/rdeforest)\n-   [Sentry](https://sentry.io)\n-   [ServieJS](https://github.com/serviejs)\n-   [Skunk Team](https://skunk.team)\n-   [Syntax](https://syntax.fm)\n-   [WriterJohnBuck](https://github.com/WriterJohnBuck)\n\n<!-- /BACKERS -->\n\n<!-- LICENSE/ -->\n\n## License\n\nUnless stated otherwise all works are:\n\n-   Copyright &copy; [Benjamin Lupton](https://balupton.com)\n\nand licensed under:\n\n-   [Artistic License 2.0](http://spdx.org/licenses/Artistic-2.0.html)\n\n<!-- /LICENSE -->\n","readmeFilename":"README.md"}