{"_id":"konan","_rev":"4133212","name":"konan","description":"find all `require` `import` calls by walking the AST","dist-tags":{"latest":"2.1.1"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"time":{"modified":"2026-03-01T18:42:10.000Z","created":"2017-02-05T12:04:49.408Z","2.1.1":"2020-07-15T14:52:02.324Z","2.1.0":"2020-07-15T13:57:09.893Z","2.0.0":"2020-07-15T13:49:01.518Z","1.2.1":"2017-08-17T02:11:55.201Z","1.2.0":"2017-08-16T16:34:05.476Z","1.1.0":"2017-02-25T09:44:41.269Z","1.0.0":"2017-02-22T16:16:57.993Z","0.1.2":"2017-02-10T04:57:57.741Z","0.1.1":"2017-02-05T12:30:43.149Z","0.1.0":"2017-02-05T12:04:49.408Z"},"users":{},"author":{"name":"egoist","email":"0x142857@gmail.com"},"repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"versions":{"2.1.1":{"name":"konan","version":"2.1.1","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","scripts":{"test":"node test/test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"@egoist/prettier-config":"^0.1.0","esm":"^3.2.25","prettier":"^2.0.5","uvu":"^0.2.2"},"dependencies":{"@babel/parser":"^7.10.5","@babel/traverse":"^7.10.5"},"gitHead":"9bc073f5d944fe1ae240e6966bde9160055a9db7","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@2.1.1","_nodeVersion":"12.18.2","_npmVersion":"6.14.5","dist":{"shasum":"eea88f05c56249b78903b952b953393900346dd1","size":2829,"noattachment":false,"key":"/konan/-/konan-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-2.1.1.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/konan_2.1.1_1594824722212_0.14778239063406517"},"_hasShrinkwrap":false,"publish_time":1594824722324,"_cnpm_publish_time":1594824722324,"_cnpmcore_publish_time":"2021-12-16T16:09:26.493Z"},"2.1.0":{"name":"konan","version":"2.1.0","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"eslint-config-rem":"^3.2.0","jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"extends":"rem/prettier","envs":["jest"],"ignores":["**/*/fixture*.js"]},"dependencies":{"@babel/parser":"^7.10.5","@babel/traverse":"^7.10.5"},"gitHead":"04182de77f5020c6678e93ad39d74c253c65764c","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@2.1.0","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"shasum":"56ad325b0ba31a38c8a7eadcc37481503225650d","size":2891,"noattachment":false,"key":"/konan/-/konan-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-2.1.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/konan_2.1.0_1594821429797_0.7096031546907333"},"_hasShrinkwrap":false,"publish_time":1594821429893,"_cnpm_publish_time":1594821429893,"_cnpmcore_publish_time":"2021-12-16T16:09:26.704Z"},"2.0.0":{"name":"konan","version":"2.0.0","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"eslint-config-rem":"^3.2.0","jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"extends":"rem/prettier","envs":["jest"],"ignores":["**/*/fixture*.js"]},"dependencies":{"@babel/parser":"^7.10.5","@babel/traverse":"^7.10.5"},"gitHead":"7335c5343b3373ef08872d38f80c3eeb1fcd2289","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@2.0.0","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"shasum":"5a099d742b23e6ae1e298ec197c2046650f3d8b7","size":2888,"noattachment":false,"key":"/konan/-/konan-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-2.0.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/konan_2.0.0_1594820941384_0.21356358947075993"},"_hasShrinkwrap":false,"publish_time":1594820941518,"_cnpm_publish_time":1594820941518,"_cnpmcore_publish_time":"2021-12-16T16:09:26.909Z"},"1.2.1":{"name":"konan","version":"1.2.1","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"eslint-config-rem":"^3.2.0","jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"extends":"rem/prettier","envs":["jest"],"ignores":["**/*/fixture*.js"]},"dependencies":{"babel-traverse":"^6.23.1","babylon":"^6.15.0"},"gitHead":"75223238a11f98e92cd02261876d30e1ac0783ed","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@1.2.1","_npmVersion":"5.3.0","_nodeVersion":"8.3.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"51cdc2e7c6f500d8217cc8976303521733a43b57","size":2859,"noattachment":false,"key":"/konan/-/konan-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-1.2.1.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/konan-1.2.1.tgz_1502935915057_0.40294951666146517"},"directories":{},"publish_time":1502935915201,"_hasShrinkwrap":false,"_cnpm_publish_time":1502935915201,"_cnpmcore_publish_time":"2021-12-16T16:09:27.077Z"},"1.2.0":{"name":"konan","version":"1.2.0","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"eslint-config-rem":"^3.2.0","jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"extends":"rem/prettier","envs":["jest"],"ignores":["**/*/fixture*.js"]},"dependencies":{"babel-traverse":"^6.23.1","babylon":"^6.15.0"},"gitHead":"50036617bf81efeabc758ff9e55dcb4afb630e45","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@1.2.0","_npmVersion":"5.3.0","_nodeVersion":"7.6.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"16bede7edd93e862824172ec430ee530140ad530","size":2855,"noattachment":false,"key":"/konan/-/konan-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-1.2.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/konan-1.2.0.tgz_1502901245387_0.9176055728457868"},"directories":{},"publish_time":1502901245476,"_hasShrinkwrap":false,"_cnpm_publish_time":1502901245476,"_cnpmcore_publish_time":"2021-12-16T16:09:27.329Z"},"1.1.0":{"name":"konan","version":"1.1.0","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"space":2,"semicolon":false,"envs":["jest"]},"dependencies":{"babel-traverse":"^6.23.1","babylon":"^6.15.0"},"gitHead":"ab7feb7d00e5f099a9403d417bc4a75b490f723f","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@1.1.0","_shasum":"337743c4b97b4bd1ef8b62a24b315eb8bc4b2094","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.6.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"337743c4b97b4bd1ef8b62a24b315eb8bc4b2094","size":2776,"noattachment":false,"key":"/konan/-/konan-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-1.1.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/konan-1.1.0.tgz_1488015881015_0.39643099531531334"},"directories":{},"publish_time":1488015881269,"_hasShrinkwrap":false,"_cnpm_publish_time":1488015881269,"_cnpmcore_publish_time":"2021-12-16T16:09:27.772Z"},"1.0.0":{"name":"konan","version":"1.0.0","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"space":2,"semicolon":false,"envs":["jest"]},"dependencies":{"babel-traverse":"^6.23.1","babylon":"^6.15.0"},"gitHead":"c0a0a2fd049b19e13683da0bbc551bf642429b90","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@1.0.0","_shasum":"354deff7cb86ff3edf7c5626777e236751113005","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"354deff7cb86ff3edf7c5626777e236751113005","size":2732,"noattachment":false,"key":"/konan/-/konan-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-1.0.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/konan-1.0.0.tgz_1487780217753_0.008789633167907596"},"directories":{},"publish_time":1487780217993,"_hasShrinkwrap":false,"_cnpm_publish_time":1487780217993,"_cnpmcore_publish_time":"2021-12-16T16:09:27.992Z"},"0.1.2":{"name":"konan","version":"0.1.2","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"space":2,"semicolon":false,"envs":["jest"]},"dependencies":{"babylon":"^6.15.0"},"gitHead":"fcb509e6e4e080a55ea30c92c15570d31e87922f","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@0.1.2","_shasum":"4ce21a35191741a0fa522a30152d1fd4097e6df3","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"4ce21a35191741a0fa522a30152d1fd4097e6df3","size":2788,"noattachment":false,"key":"/konan/-/konan-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-0.1.2.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/konan-0.1.2.tgz_1486702677510_0.6489161683712155"},"directories":{},"publish_time":1486702677741,"_hasShrinkwrap":false,"_cnpm_publish_time":1486702677741,"_cnpmcore_publish_time":"2021-12-16T16:09:28.247Z"},"0.1.1":{"name":"konan","version":"0.1.1","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"space":2,"semicolon":false,"envs":["jest"]},"dependencies":{"babylon":"^6.15.0"},"gitHead":"25ce597940375fb4728f1d81c8c8537109c6d151","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@0.1.1","_shasum":"b09e7b2615305f83989c1b47d399abc9807ec7b3","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"b09e7b2615305f83989c1b47d399abc9807ec7b3","size":2441,"noattachment":false,"key":"/konan/-/konan-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-0.1.1.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/konan-0.1.1.tgz_1486297841240_0.4354943379294127"},"directories":{},"publish_time":1486297843149,"_hasShrinkwrap":false,"_cnpm_publish_time":1486297843149,"_cnpmcore_publish_time":"2021-12-16T16:09:28.476Z"},"0.1.0":{"name":"konan","version":"0.1.0","description":"find all `require` `import` calls by walking the AST","repository":{"url":"git+https://github.com/egoist/konan.git","type":"git"},"main":"index.js","files":["index.js"],"scripts":{"test":"jest && npm run lint","lint":"xo index.js __test__/*.test.js"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","jest":{"testEnvironment":"node"},"devDependencies":{"jest-cli":"^18.1.0","xo":"^0.17.1"},"xo":{"space":2,"semicolon":false,"envs":["jest"]},"dependencies":{"babylon":"^6.15.0"},"gitHead":"622c79f3637d409c5644905349e8325133504ea3","bugs":{"url":"https://github.com/egoist/konan/issues"},"homepage":"https://github.com/egoist/konan#readme","_id":"konan@0.1.0","_shasum":"b7448f7080fcef2716585364b78a18be090ad14d","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"b7448f7080fcef2716585364b78a18be090ad14d","size":2401,"noattachment":false,"key":"/konan/-/konan-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/konan/download/konan-0.1.0.tgz"},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"},{"name":"rem","email":"shinjisays@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/konan-0.1.0.tgz_1486296287713_0.8628799563739449"},"directories":{},"publish_time":1486296289408,"_hasShrinkwrap":false,"_cnpm_publish_time":1486296289408,"_cnpmcore_publish_time":"2021-12-16T16:09:28.695Z"}},"readme":"# konan\n\n[![NPM version](https://img.shields.io/npm/v/konan.svg?style=flat)](https://npmjs.com/package/konan) [![NPM downloads](https://img.shields.io/npm/dm/konan.svg?style=flat)](https://npmjs.com/package/konan) [![Build Status](https://img.shields.io/circleci/project/egoist/konan/master.svg?style=flat)](https://circleci.com/gh/egoist/konan) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)\n\n> Like [detective](https://github.com/substack/node-detective) but also supports ES6 `import` and more.\n\n## Install\n\n```bash\nyarn add konan\n# or hey old school\nnpm install --save konan\n```\n\n## Supported syntax\n\n- `require` call\n- `import/export` ES6 modules\n- `import()` [Dynamic import](https://github.com/tc39/proposal-dynamic-import)\n- You can use all language features supported by [babel parser](https://github.com/babel/babel/tree/master/packages/babel-parser), including `jsx` syntax by default\n\n## Usage\n\n```js\nconst konan = require('konan')\n\nkonan(`\nimport React, {Component} from 'react'\nconst vue = require('vue/dist/vue')\nimport('./my-async-module').then()\nrequire(path.resolve('./'))\n`)\n/*\nresult =>\n{\n  strings: ['react', 'vue/dist/vue', './my-async-module'],\n  expressions: ['path.resolve(\\'./\\')']\n}\n*/\n```\n\n## API\n\n### konan(input, [options])\n\n#### input\n\nType: `string` `object`<br>\nRequired: `true`\n\nSource content as string or AST tree.\n\n#### options\n\n##### dynamicImport\n\nType: `boolean`<br>\nDefault: `true`\n\nYou can disable detecting dynamic `import()`-ed modules.\n\n##### parse\n\nType: `object`<br>\nDefault: `{sourceType: 'module', plugins: ['jsx', 'typescript', 'dynamicImport']}`\n\n[babel parser](https://github.com/babel/babel/tree/master/packages/babel-parser) parse [options](https://babeljs.io/docs/en/next/babel-parser.html#options).\n\n## FAQ\n\n### What does konan stand for?\n\nIt stands for `Meitantei Konan` (名探偵コナン), the main character in [Detective Conan](https://en.wikipedia.org/wiki/Case_Closed).\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n## Author\n\n**konan** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>\nAuthored and maintained by egoist with help from contributors ([list](https://github.com/egoist/konan/contributors)).\n\n> [egoistian.com](https://egoistian.com) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)\n","_attachments":{},"homepage":"https://github.com/egoist/konan#readme","bugs":{"url":"https://github.com/egoist/konan/issues"},"license":"MIT"}