{"_id":"@depack/detect","_rev":"300262","name":"@depack/detect","description":"Detects Dependencies In The Source File.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:07:37.000Z","created":"2019-02-09T16:42:54.285Z","1.1.0":"2019-05-14T11:30:40.033Z","1.0.2":"2019-04-19T06:14:39.860Z","1.0.1":"2019-04-02T17:07:24.216Z","1.0.0":"2019-02-09T16:42:54.285Z"},"users":{},"author":{"name":"Anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"git://github.com/dpck/detect.git"},"versions":{"1.1.0":{"name":"@depack/detect","version":"1.1.0","description":"Detects Dependencies In The Source File.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/dpck/detect.git"},"keywords":["detect","depack"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/dpck/detect/issues"},"homepage":"https://github.com/dpck/detect#readme","devDependencies":{"@wrote/read":"^1.0.4","alamode":"^2.2.0","documentary":"^1.27.2","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^4.1.1-alpha"},"dependencies":{"mismatch":"^1.2.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@depack/detect@1.1.0","dist":{"shasum":"e5e5cbd2c7f68d689363f4b4a7179a2918d45ff3","size":2965,"noattachment":false,"key":"/@depack/detect/-/@depack/detect-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/@depack/detect/download/@depack/detect-1.1.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect_1.1.0_1557833439930_0.6248665643246785"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T01:45:58.002Z","publish_time":1557833440033,"_cnpm_publish_time":1557833440033},"1.0.2":{"name":"@depack/detect","version":"1.0.2","description":"Detects Dependencies In The Source File.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/dpck/detect.git"},"keywords":["detect","depack"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/dpck/detect/issues"},"homepage":"https://github.com/dpck/detect#readme","devDependencies":{"@wrote/read":"^1.0.4","alamode":"^1.9.3","documentary":"^1.23.4","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.11.6"},"dependencies":{"mismatch":"^1.1.1"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@depack/detect@1.0.2","dist":{"shasum":"79992a37e23bfa5747b328d929f378fba6233d14","size":2894,"noattachment":false,"key":"/@depack/detect/-/@depack/detect-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/@depack/detect/download/@depack/detect-1.0.2.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect_1.0.2_1555654479607_0.6357439768983186"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T01:45:56.346Z","publish_time":1555654479860,"_cnpm_publish_time":1555654479860},"1.0.1":{"name":"@depack/detect","version":"1.0.1","description":"Detects Dependencies In The Source File.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"alanode","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/dpck/detect.git"},"keywords":["detect","depack"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/dpck/detect/issues"},"homepage":"https://github.com/dpck/detect#readme","devDependencies":{"@wrote/read":"1.0.2","alamode":"1.9.0","documentary":"1.23.2","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"3.11.2"},"dependencies":{"mismatch":"1.1.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@depack/detect@1.0.1","dist":{"shasum":"912a0384f8ba01c9bab3e73bb6c4581783cb3c91","size":2856,"noattachment":false,"key":"/@depack/detect/-/@depack/detect-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/@depack/detect/download/@depack/detect-1.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect_1.0.1_1554224844140_0.042782276230583616"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T01:45:54.700Z","publish_time":1554224844216,"_cnpm_publish_time":1554224844216},"1.0.0":{"name":"@depack/detect","version":"1.0.0","description":"Detects Dependencies In The Source File.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","doc":"NODE_DEBUG=doc doc documentary -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"NODE_DEBUG=doc doc src/index.js -g","build":"yarn-s d b doc","rec":"NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f","e":"node example","example/":"yarn e example/example.js"},"repository":{"type":"git","url":"git://github.com/dpck/detect.git"},"keywords":["detect","depack"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/dpck/detect/issues"},"homepage":"https://github.com/dpck/detect#readme","devDependencies":{"@wrote/read":"1.0.2","alamode":"1.7.3","documentary":"1.21.1","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"3.6.6"},"dependencies":{"mismatch":"1.0.3"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@depack/detect@1.0.0","dist":{"shasum":"68b23604687e96eacceffd8524bd1b6a2989ea48","size":2798,"noattachment":false,"key":"/@depack/detect/-/@depack/detect-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@depack/detect/download/@depack/detect-1.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect_1.0.0_1549730574171_0.9769707666080258"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T01:45:53.590Z","publish_time":1549730574285,"_cnpm_publish_time":1549730574285}},"readme":"# @depack/detect\n\n[![npm version](https://badge.fury.io/js/%40depack%2Fdetect.svg)](https://npmjs.org/package/@depack/detect)\n\n`@depack/detect` Detects Dependencies In The Source File.\n\n```sh\nyarn add -E @depack/detect\n```\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`detect(source: string): Array<string>`](#detectsource-string-arraystring)\n- [Copyright](#copyright)\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/0.svg?sanitize=true\"></a></p>\n\n## API\n\nThe package is available by importing its default function:\n\n```js\nimport detect from '@depack/detect'\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/1.svg?sanitize=true\"></a></p>\n\n## `detect(`<br/>&nbsp;&nbsp;`source: string,`<br/>`): Array<string>`\n\nReturns the paths or names of packages that are imported in the source code.\n\n_For example, for the given source file_\n```js\nimport test from 'test'\nimport test2, * as test3 from 'test2'\nimport 'test3'\nexport { default as Test } from 'test4'\n```\n\n_It will produce the following output_\n\n```js\n/* yarn example/ */\nimport detect from '@depack/detect'\nimport read from '@wrote/read'\n\n(async () => {\n  const source = await read('example/source.js')\n  const res = detect(source)\n  console.log(res)\n})()\n```\n```js\n[ 'test', 'test2', 'test3', 'test4' ]\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/2.svg?sanitize=true\"></a></p>\n\n## Copyright\n\n<table>\n  <tr>\n    <th>\n      <a href=\"https://artd.eco\">\n        <img src=\"https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png\" alt=\"Art Deco\" />\n      </a>\n    </th>\n    <th>© <a href=\"https://artd.eco\">Art Deco</a> for <a href=\"https://artd.eco/depack\">Depack</a> 2019</th>\n    <th>\n      <a href=\"https://www.technation.sucks\" title=\"Tech Nation Visa\">\n        <img src=\"https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif\"\n          alt=\"Tech Nation Visa\" />\n      </a>\n    </th>\n    <th><a href=\"https://www.technation.sucks\">Tech Nation Visa Sucks</a></th>\n  </tr>\n</table>\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/-1.svg?sanitize=true\"></a></p>","_attachments":{},"homepage":"https://github.com/dpck/detect#readme","bugs":{"url":"https://github.com/dpck/detect/issues"},"license":"MIT"}