{"versions":{"1.0.0":{"name":"es-main","version":"1.0.0","description":"Test if an ES module is run directly (require.main replacement)","main":"src/main.js","type":"module","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"pretest":"eslint .","test:with-extension":"node --no-warnings test.js","test:without-extension":"node --no-warnings test","test:without-node":"NODE_NO_WARNINGS=1 ./test.js","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules"],"license":"MIT","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.8.0","eslint-config-tschaub":"^13.1.0","npm-run-all":"^4.1.5"},"eslintConfig":{"extends":"tschaub","parser":"babel-eslint"},"gitHead":"e160459384e064d130c5b5436fd44bfe1f8c5a3a","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.0.0","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-t355DaKttqpAg7vqugTtfg/RTWobZR4Txkh3ZrHCOBRiKnecjY8Y48BaHwJ94+rHqv/IcYC4E6/YIEit+nsqpQ==","shasum":"bec7ab70f727cd059c7b4a66abd7c2ed995e89ed","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.0.0.tgz","fileCount":3,"unpackedSize":2170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTcDwCRA9TVsSAnZWagAAXVIQAKAvhnJ+Duncg+87Z/04\nXYzfX1xSrfMa6XsKtU3iscyZdw8wz1YK1aaOEbPZuLfYsaR5oE0u7NLgPnuQ\npreZdmeWXsh34eAY44+oNBCciVtqLJeXfDOGpKRbPGQ0wXTfdRqBDOFk6vi/\naXkIGBBFDVtgLpPax9VM2Go9OXTV1ihwSO7foK5/Ja4IwlKIeOr5GhbW4ESm\nCFlrfg/EkHxAIP6jVs2SATriz4xG04RbTh7tMANBVxkrXR3ep+d6vmB81mBD\nkqNfRSr2LdAAPbYOOEm0fNzLYTyW7lkDFL8A9TgUAMZ/jmOv8UZ9jg8Fttnk\n9suVGP6178IY6J56jsXxkfgjwVSZiFAImTKnmaZipbShZfR2iaPB7d5/36fo\nSqKCM3IPdGAfdgNC35rTtkM+QwThcZQm0vhH6vKsDE4pJfk7DpZRV8P00apx\nVhFfkAhHft/6v8UeWFK297A8PbcdwDaeuP5fQm0i+FWA5bXcQEUXI39sQf1I\nAa3R+EED5glI9sPy8Xo4kM1k5R7qnUGfTGwZPobXd5JC3SSzQ0qEPGxRdAXK\nG0VYt6Ebk7wm7v9HmK6wxMGKdwJUKFdmD6WSS58mz88kJtTqAuTCbF1eCLta\na55H2uxnArNgR46PIi8e4/pO5jn/6wejJaMC7H96z5M3FTMIVQB0TFAoc51z\np51S\r\n=wh6W\r\n-----END PGP SIGNATURE-----\r\n","size":1162},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.0.0_1582153967894_0.6444338829111138"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T15:37:22.916Z","contributors":[]},"1.0.1":{"name":"es-main","version":"1.0.1","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"pretest":"eslint .","test:with-extension":"node --no-warnings test.js","test:without-extension":"node --no-warnings test","test:without-node":"NODE_NO_WARNINGS=1 ./test.js","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules"],"license":"MIT","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.8.0","eslint-config-tschaub":"^13.1.0","npm-run-all":"^4.1.5"},"eslintConfig":{"extends":"tschaub","parser":"babel-eslint"},"gitHead":"bde9ec1f5ac70e151810b7a7254312a2a8f0272b","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.0.1","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-UhiveG7TyhTfFrZKEDP+g3M3X061G0SiYkUPUJiJar3sr4WwypPLDdoAFfr6JIwDGMVjdfFIkt0Uqdtw41d24g==","shasum":"cb55470636cdd570caaa2e50f0c855037a48acae","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.0.1.tgz","fileCount":3,"unpackedSize":2166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTcLoCRA9TVsSAnZWagAA+CoP/RKSvTvD2yRjam3CCjSP\ncZlRRf6EHKrCDwYAnTzmJJc9+tUvBtzaIPWNiq0tHwAm+QR4RfIDKPJBSOSX\nFvu8DUeiyDon+oATr7MScgkObbF549jBXWW3WoI+IIgqOJUIIJieDs95euxi\nVMcp9kJNnbMAEKo7P84ugxgn7BOucwxalDmawIxJLyzSVPoxA4S1FSYB5qsg\nvu/gHopxTUXkRV/MQu3A9vmB1DExh0GY8/Db456OmOy/ha4MeGbVwfK0oy9p\nJT4HRmWPv29FXyUyQ8750uA6Dz+TQKu6DoBOFx26AC1JiH/ISx+v+Xo0mae7\nVDWbdMreZn7jswGe8+Cnyb06GSyORveiEIV/eJrTPGeQneAR746zvBs/BJEM\nFSqBfGNKaPbX52KFeVPldY/c9/AKZ6IiCLHpnlZ/h5RsEID7xdt+PQkud8TX\n5My8tMb+jTTbLzvQdxDxO+io6yK3dNxfv9V190RBM2bGHct6C7QkKiPoC2xI\n1i4gpgsUzkaYMGI44LUraLKub2RB12/nIBRbdtla0h0Olk2gQppGnfMreMb0\nE7v2Or/uztLd9X0rZJIqfGoALGyupbTXUUhOAG7l9g9kzKbiptHUqRGWQUbY\nUUpn0oyIdShYwrp87tdvOLTaDA9mwZ3H+Urk6CM9/BIRQwDQ1ABXx3Zce+fn\nI6UR\r\n=mNce\r\n-----END PGP SIGNATURE-----\r\n","size":1158},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.0.1_1582154471935_0.5503046394938198"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T15:37:23.791Z","contributors":[]},"1.0.2":{"name":"es-main","version":"1.0.2","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"pretest":"eslint .","test:with-extension":"node test.js","test:without-extension":"node test","test:without-node":"./test.js","test":"NODE_NO_WARNINGS=1 npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules"],"license":"MIT","devDependencies":{"babel-eslint":"^10.0.3","eslint":"^6.8.0","eslint-config-tschaub":"^13.1.0","npm-run-all":"^4.1.5"},"eslintConfig":{"extends":"tschaub","parser":"babel-eslint"},"gitHead":"fc29220e78844c67ba766db1dc39967a6d020819","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.0.2","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-LLgW8Cby/FiyQygrI23q2EswulHiDKoyjWlDRgTGXjQ3iRim2R26VfoehpxI5oKRXSNams3L/80KtggoUdxdDQ==","shasum":"c9030d78796f609f865b66f4125a78d77fec3de3","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.0.2.tgz","fileCount":3,"unpackedSize":2237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTdJaCRA9TVsSAnZWagAA1HcP+wTuoRVQR+pPRlgwBcry\nAaaHSvpluxq827H2ykez+Ki5gB6GRKZIsERheylwGavNNG0SRjg6NrJk1E90\nC+hh8NkLEjFc2X0bpR89cLxN4PwYBkRQ3VxCi70kYfKTH8zPYw7JOoAYDBJ9\nZrPtCbNzesMgpshGQKgqvUtwhGkELQ55rPURRtbQhX9BXB1AC8lHphf5JM9O\nMqq9bQkOK5A7VpxfvpNM81gYQJoq+2f8U25cNQB/N7YLE2lNMAWnz+FNw1q2\nEY3GG9CQuJMtMIqeQLVcpLQLEVLuLdONIPQTUzBGHfBFCXYpUU2wy1hr1pNI\n6L2KX0h89MQDTCLxfD0LOI9XFME5kYqePvkRiUJQvMSSMmapP5xXH6Yb6NcS\nfct1gSeWYhbq+wt+bNaTnPyaXX5PTnmDCh3GIG1oRViXehdfElpR3eButCX0\nSll+6nG6apoI04TclKInxMzh4oZxONO/NksoKv1w07ytr54aYwoDTbLH4IJV\n4gO7c1r6/M2kNWwssH0Nr5UXmC86tNG+RaUyHbnfXBoWNgDVWgm9mKi+MA63\n0iL3jfehvPtJbyMJmmj3VS0Qz9eyJy7LVHaCZxWFNg9tNOTo0ngwzQRGNuz/\nOCW5TTw5k3k7amJyRxi+VdyExLFgiAs/3wF205ARZY/jHgyhdzyXH808fMVN\nfwbp\r\n=ZRUc\r\n-----END PGP SIGNATURE-----\r\n","size":1161},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.0.2_1582158425788_0.36841010760033877"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T15:37:23.893Z","contributors":[]},"1.1.0":{"name":"es-main","version":"1.1.0","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"lint":"eslint .","pretest":"npm run lint","generate-types":"npx tsc -declaration --declarationMap --emitDeclarationOnly --noEmit false","preversion":"npm run generate-types","test:with-extension":"node test.js","test:without-extension":"node test","test:without-node":"./test.js","test:types":"npx tsc --noEmit","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules"],"license":"MIT","devDependencies":{"@types/node":"^18.0.0","eslint":"^8.18.0","eslint-config-tschaub":"^14.0.0","npm-run-all":"^4.1.5","typescript":"^4.7.4"},"eslintConfig":{"extends":"tschaub","rules":{"jsdoc/check-examples":"off"}},"types":"./main.d.ts","gitHead":"de721d1f538cf6d202b6df1f927638faac448ae9","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.1.0","_nodeVersion":"17.5.0","_npmVersion":"8.12.0","dist":{"integrity":"sha512-JZtrLP0HsWNwFIItR3qTBvz+5BUNDhTjWQ11QDhGs7uVmx8MtyGLjP1I67izMFpDOb6BzyWrDO7qUNkyMj8wTQ==","shasum":"fe336593864e87eeb69923ddf300687c2e2d55f9","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.1.0.tgz","fileCount":5,"unpackedSize":3756,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTXNleIJ6+LmW2bDNf6+G1jgx5B7H5tW5lATT5rkOuLgIgPMp2qsM5zoRzFj/3k5gFhDuDYykvnCHywUvEKN+RLew="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuyhWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrtxQ//eMb6KSQLhYVEsUuDerNGm8fyhD9M8bjKukrIBztedIO8mlzj\r\nOGBHASC2CHc9/F/1lWBkaHvr1iRTb08nuTaEftxy5cksRNjRLhJSk/SOsaor\r\nFX24GOrYBesmrDA0bTHHxss+IInwhn/uQSoKJEy6thMd/VXAHm5ZH9uUT9Mh\r\noYi5O0bYgApZByms7zBFU4TDDZlFPdjonQIRZGPq0D9uTGWN4BaN6Y73iejV\r\nFmVpykBctpBjcnwELHAB/lQw6mX+GWAXAfCDgA/lPWi8kIwD9RvHFI2h/yxV\r\nLivHktkx3vH74HqrZvWrTaERzyI12kpPonT3prKaZOoIT3Vba5HBpTJBfZTp\r\nRTuGS9TlTNfhsj8Tz7wh2Z5Dd+iq311pXXTShvzzi1+CmRkXeWIPZBa8DjJS\r\nfnCB4oX3uxMJQxkwuzKxxEtXH6ndzzRrkSJneFubk57EIVyxwYmB0no170pZ\r\neElHndsnFPmU1rIdC+StV/l67+7v2Hr/qMu2j6aeUnK/Pcm7QpSPECmh5W2z\r\nQzzFFX1wcv992poGZyagywZ8HOiLsv0tgzBiJUqCb9U+SLAPdIWiUj/B/OsK\r\nl2cEhTb2rs9ww83kctYKKard/H6oTys9KDA/O0QzkowUpGhHzb9ku1fu89AH\r\nUjAzKH7R36Q4yEi//WBjNrcRSk0Ad/F8Ibc=\r\n=C3JK\r\n-----END PGP SIGNATURE-----\r\n","size":1649},"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.1.0_1656432726379_0.03931316114528771"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-28T16:19:49.175Z","contributors":[]},"1.1.1":{"name":"es-main","version":"1.1.1","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","types":"main.d.ts","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"lint":"eslint .","pretest":"npm run lint","generate-types":"npx tsc -declaration --declarationMap --emitDeclarationOnly --noEmit false","preversion":"npm run generate-types","test:with-extension":"node test.js","test:without-extension":"node test","test:without-node":"./test.js","test:types":"npx tsc --noEmit","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules"],"license":"MIT","devDependencies":{"@types/node":"^18.0.0","eslint":"^8.18.0","eslint-config-tschaub":"^14.0.0","npm-run-all":"^4.1.5","typescript":"^4.7.4"},"eslintConfig":{"extends":"tschaub","rules":{"jsdoc/check-examples":"off"}},"gitHead":"52c1d06fdca3e2e6a385e56a85311f69d93afa3e","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.1.1","_nodeVersion":"17.5.0","_npmVersion":"8.12.0","dist":{"integrity":"sha512-0dhHQK+Qfq0Y7ttFsTObSjSnwpwxXXA2vUdLEpW8enUmVuf/DJiI2t4rMJM+ci58Calrq7yWviJTcy+7G6zsWQ==","shasum":"1dca608a5b2e28cb44eca7e0268dd4130af0d617","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.1.1.tgz","fileCount":5,"unpackedSize":3780,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENOjPo1hbQMoYqRFeOS/sxy66XXeHCB8komJhn3b2GhAiBeWErainAu1tkZkrZnpFaKedM9i5AedRhP9eEaGBirLQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuyn1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+rA//bRvm8u8ZprWD1TIMA2hIsL17LlxcW1P7ZPme3Ca5TkZ6JHxr\r\nA0j4Z9ffM3wYcRzaoRZFHzxj1Y5Pg2bAinawsdv3Pl4YmXdd0IB0HfyDRUXv\r\nXpyoY3FFtyLFvRfhOedeV/Fb14YpjZedldhF1lw9FWkH2fI3QmjTZSDxPPtN\r\nJHdDLpnlN9xeEBtUUpOOCKg38CNDoNq0dUek/K91uqbStHH8sD18qPG96diP\r\nrPzI05bRI9Xk5TNIv4qne/uX3W7kTxBUyyRdVcfIj+4eUwcwMS43YLIjgLj0\r\nUNkswunbdr54H8f98iHd287kiKqInoZZeHpAvD7HTAv2Wn01U7jWtq2DTVcm\r\nlU8pkiIR9MpOWJRJVWSvqFpJQoXpyugQ2X7/yRSH+1c1aP8Kg6C0ExfkCiKc\r\nXtXpHyhNJNTES8TWKdrOyUdjc1EcL9+Soyc07EFsWnQvxgOCp7HruVKgAO47\r\n1yWC3IFK0IATGboC0S/B6xKHN/oPMkYeb3C2BZBz5eik+Ffn4R0lJc/GjXdH\r\nfvmA/GDSmnr+NlRHSb1u4k+scriNk5L9eS/68JpqoTCau9+ONg/zWPSRIF1y\r\naD9UYfmO5NQ6+ZTKNl8d0NwJPMNe/Z+oLB3ufx7X4dhin0xM1MLn1TL2qJJv\r\n/H31FN/4bQ6ZKSt/wf8/GXMyeDO0rRlQ9SE=\r\n=1koE\r\n-----END PGP SIGNATURE-----\r\n","size":1654},"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.1.1_1656433141078_0.6900534038859021"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-28T16:19:49.470Z","contributors":[]},"1.2.0":{"name":"es-main","version":"1.2.0","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","types":"main.d.ts","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"lint":"eslint .","pretest":"npm run lint","generate-types":"npx tsc -declaration --declarationMap --emitDeclarationOnly --noEmit false","preversion":"npm run generate-types","test:with-extension":"node test.js","test:without-extension":"node test","test:without-node":"./test.js","test:resolve-index":"node test-resolve-index","test:resolve-main":"node test-resolve-main","test:repl":"node --eval \"import('./main.js').then(mod => {if (mod.default({})) throw new Error('expected false')})\"","test:types":"npx tsc --noEmit","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules"],"license":"MIT","devDependencies":{"@types/node":"^18.0.0","eslint":"^8.18.0","eslint-config-tschaub":"^14.0.0","npm-run-all":"^4.1.5","typescript":"^4.7.4"},"eslintConfig":{"extends":"tschaub","rules":{"jsdoc/check-examples":"off"}},"gitHead":"ba76c70b3fb1aeb275b1de4466a961bce64f0e6e","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.2.0","_nodeVersion":"18.4.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-A4tCSY43O/mH4rHjG1n0mI4DhK2BmKDr8Lk8PXK/GBB6zxGFGmIW4bbkbTQ2Gi9iNamMZ9vbGrwjZOIeiM7vMw==","shasum":"b85954f1d9d9f542fcb08685ec19515f969bad16","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.2.0.tgz","fileCount":5,"unpackedSize":4168,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHzP9mTgd1bKkQ8s4Uj1lEhw5JGr/Ii2EHtffUZOScwoAiEA2bW6Y3EiC6Ug7GiUSMiVxOBrdU9ZYpGWlnFl5DcEKsE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu0EfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonmA//S1nxoD6i27EMB0RvPgmcRdyPg5qtBNFwag/XxP+iJltafNoz\r\nosxITr3SJQi6I/HiMocnG6vMmNXIyB4/5KPGyjpPXFPf0yZc0eMQqiIOr5L6\r\nzv0MoT/0X1lwKIlPlney0F+4iPozIOhXFbXNDs7zMMpcx9dYIZ0+eCJ342Sv\r\naJwt71A+ZUnZyS9eZ+9qn3HPDWHn8uFq1bnN2LEGTZsAKg+u+10M0XRr6GOE\r\nJTn1KvWxNIrbigP8Yni/2f+AR9WhbS+XLrwlXQv4rBRWWpe5nsEX9gTU1yaY\r\n245z/OflbUKTV3kzPr+BGESh5hcszrTpBVIdNB3GsSLP0FEqJ71tqinEMC5T\r\nT6rhFntDpN9zlnXL9FJ9/S950A3nLRg3Pc089pyAi7wNbgX8Y9XK6r8AKDmT\r\n2nOFoyAat7HJLm7RhNHh1j3heya6pQJ6srw4dXh0OqavGfvN9/t4c55OVnJZ\r\ncSMBJar7tlFX949Uv5ODJWGoXXhJCuZnv0Z7naitYaR8DNirmndtLK9w/MsE\r\n45IE/wONv/GTexishvrIfg5D7Mc5aBa9gzXnB1Wf2XJcQw5hYdgKIII1ZFuu\r\nyKzuoA9wrleiW94TLFpMM/7pozco5MwRhxPGJaooH4zl0B9vWAh8OTkc59wH\r\nnk7vouL68oz+cPG+OZSUw11eWboPwc+dylg=\r\n=SVn5\r\n-----END PGP SIGNATURE-----\r\n","size":1805},"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.2.0_1656439071471_0.1704529644956283"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-28T18:12:22.111Z","contributors":[]},"1.3.0":{"name":"es-main","version":"1.3.0","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","types":"main.d.ts","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"lint":"eslint .","pretest":"npm run lint","generate-types":"npx tsc -declaration --declarationMap --emitDeclarationOnly --noEmit false","preversion":"npm run generate-types","test:with-extension":"node test/test.js","test:without-extension":"node test/test","test:without-node":"./test/test.js","test:resolve-index":"node test/resolve-index","test:resolve-main":"node test/resolve-main","test:repl":"node --eval \"import('./main.js').then(mod => {if (mod.default({})) throw new Error('expected false')})\"","test:types":"npx tsc --noEmit","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules","import.meta.main"],"license":"MIT","devDependencies":{"@types/node":"^20.5.8","eslint":"^8.18.0","eslint-config-tschaub":"^14.1.2","npm-run-all":"^4.1.5","typescript":"^5.2.2"},"eslintConfig":{"extends":"tschaub","rules":{"jsdoc/check-examples":"off"}},"gitHead":"06885f2e95a5e5a8049ffc5f42d80443eb3c55b2","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_id":"es-main@1.3.0","_nodeVersion":"18.4.0","_npmVersion":"9.1.2","dist":{"integrity":"sha512-AzORKdz1Zt97TzbYQnIrI3ZiibWpRXUfpo/w0xOJ20GpNYd2bd3MU9m31zS/aJ1TJl6JfLTok83Y8HjNunYT0A==","shasum":"14a7ebef61a5480126158a7b24dac9eac81544a3","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.3.0.tgz","fileCount":5,"unpackedSize":4207,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDazT3SYJbPWKljsMKXinvK6PFr+F3sFv700S72EfpFfgIhAPv8ERFHoZqvxABeuV5x9WtFqzru9KtAZgNhloQrbJTj"}]},"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-main_1.3.0_1693677446393_0.46646252719191605"},"_hasShrinkwrap":false,"contributors":[]},"1.4.0":{"name":"es-main","version":"1.4.0","description":"Test if an ES module is run directly (require.main replacement)","main":"main.js","type":"module","types":"main.d.ts","repository":{"type":"git","url":"git://github.com/tschaub/es-main.git"},"scripts":{"lint":"eslint .","pretest":"npm run lint","generate-types":"npx tsc -declaration --declarationMap --emitDeclarationOnly --noEmit false","preversion":"npm run generate-types","test:with-extension":"node test/test.js","test:without-extension":"node test/test","test:without-node":"./test/test.js","test:resolve-index":"node test/resolve-index","test:resolve-main":"node test/resolve-main","test:repl":"node --eval \"import('./main.js').then(mod => {if (mod.default({})) throw new Error('expected false')})\"","test:types":"npx tsc --noEmit","test":"npm-run-all test:*"},"keywords":["require.main","process.mainModule","modules","import.meta.main"],"license":"MIT","devDependencies":{"@types/node":"^24.1.0","eslint":"^9.15.0","eslint-config-tschaub":"^15.1.0","npm-run-all":"^4.1.5","typescript":"^5.2.2"},"_id":"es-main@1.4.0","gitHead":"7ece02795e0f18efadedef808e4de16eb80dbc6c","bugs":{"url":"https://github.com/tschaub/es-main/issues"},"homepage":"https://github.com/tschaub/es-main#readme","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-/rYhbfGK/1E6L7TcoUqmrWbSnOlMoxahiZInSYKbhIZ4/dbclHtXEcrViu4Az9IzYNBT8LcXpPszfS47zbGpwA==","shasum":"74f06ecda784228f1ddd42b75c03a5f7c1596204","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/es-main/-/es-main-1.4.0.tgz","fileCount":5,"unpackedSize":4393,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICPTFS7l3a3IYvvEcF7VpoDf4akaN6/xfsB3nbjci9EMAiEA1JkO4g+jTERKYRq3hzZqZYL0Z3GUuQ7R97eVQHed8yw="}],"size":1900},"_npmUser":{"name":"anonymous","email":"tim.schaub@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"tim.schaub@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/es-main_1.4.0_1754835392938_0.7280804465073083"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-10T14:16:33.121Z","publish_time":1754835393121,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.4.0"},"name":"es-main","time":{"created":"2022-01-28T19:00:39.086Z","modified":"2025-08-10T14:16:46.658Z","1.0.0":"2020-02-19T23:12:48.007Z","1.0.1":"2020-02-19T23:21:12.032Z","1.0.2":"2020-02-20T00:27:05.959Z","1.1.0":"2022-06-28T16:12:06.647Z","1.1.1":"2022-06-28T16:19:01.282Z","1.2.0":"2022-06-28T17:57:51.613Z","1.3.0":"2023-09-02T17:57:26.557Z","1.4.0":"2025-08-10T14:16:33.121Z"},"readme":"# es-main\n\nTest if an [ES module](https://nodejs.org/api/esm.html) is run directly with Node.js.  Acts as a replacement for `require.main`.\n\n> [!NOTE]\n> If you are using Node.js versions newer than `22.18.0` or `24.2.0`, you should use the built-in [`import.meta.main`](https://nodejs.org/docs/latest/api/esm.html#importmetamain) instead of this module.\n\n## use\n\n```js\nimport esMain from 'es-main';\n\nif (esMain(import.meta)) {\n  // Module run directly.\n}\n```\n\n## why?\n\nIt can be useful to have a module that is both imported from other modules and run directly.  With CommonJS, it is possible to have a top-level condition that checks if a script run directly like this:\n\n```js\nif (require.main === module) {\n  // Do something special.\n}\n```\n\nWith ES modules in Node.js, `require.main` is [not available](https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_no_require_exports_module_exports_filename_dirname).  Other alternatives like `process.mainModule` and `module.parent` are also not defined for ES modules.  In the future, there may be [an alternative way](https://github.com/nodejs/modules/issues/274) to do this check (e.g. `import.meta.main` or a special `main` export).  Until then, this package provides a workaround.","users":{}}