{"_id":"import-inspector","_rev":"2835015","name":"import-inspector","description":"Wrap dynamic imports with metadata about the import","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2022-09-06T15:32:20.000Z","created":"2017-06-14T17:57:25.289Z","2.0.0":"2017-06-14T21:00:29.264Z","1.1.0":"2017-06-14T18:44:25.057Z","1.0.1":"2017-06-14T18:01:29.601Z","1.0.0":"2017-06-14T17:57:25.289Z"},"users":{},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"repository":{"type":"git","url":"git+https://github.com/thejameskyle/import-inspector.git"},"versions":{"2.0.0":{"name":"import-inspector","version":"2.0.0","description":"Wrap dynamic imports with metadata about the import","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/import-inspector.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.48.0"},"gitHead":"abf5b02eb883f2fc14168f1cef646d64ed615a44","bugs":{"url":"https://github.com/thejameskyle/import-inspector/issues"},"homepage":"https://github.com/thejameskyle/import-inspector#readme","_id":"import-inspector@2.0.0","scripts":{},"_shasum":"ce75fdb6a277d2800effe097e2295bc8690b2923","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"ce75fdb6a277d2800effe097e2295bc8690b2923","size":1924,"noattachment":false,"key":"/import-inspector/-/import-inspector-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/import-inspector/download/import-inspector-2.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-inspector-2.0.0.tgz_1497474029178_0.42879775585606694"},"directories":{},"publish_time":1497474029264,"_hasShrinkwrap":false,"_cnpm_publish_time":1497474029264,"_cnpmcore_publish_time":"2021-12-16T12:36:47.851Z"},"1.1.0":{"name":"import-inspector","version":"1.1.0","description":"Wrap dynamic imports with information about the import itself","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/import-inspector.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.48.0"},"gitHead":"f325287a82810b6df2ccaadbd9e3eb4ca4f5bcd7","bugs":{"url":"https://github.com/thejameskyle/import-inspector/issues"},"homepage":"https://github.com/thejameskyle/import-inspector#readme","_id":"import-inspector@1.1.0","scripts":{},"_shasum":"9054d23050a9d0bb9ba12c300fffb509597ac371","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"9054d23050a9d0bb9ba12c300fffb509597ac371","size":1890,"noattachment":false,"key":"/import-inspector/-/import-inspector-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/import-inspector/download/import-inspector-1.1.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-inspector-1.1.0.tgz_1497465864982_0.5565817581955343"},"directories":{},"publish_time":1497465865057,"_hasShrinkwrap":false,"_cnpm_publish_time":1497465865057,"_cnpmcore_publish_time":"2021-12-16T12:36:48.088Z"},"1.0.1":{"name":"import-inspector","version":"1.0.1","description":"Wrap dynamic imports with information about the import itself","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/import-inspector.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"devDependencies":{"flow-bin":"^0.48.0"},"gitHead":"001c206864e749ae424d54eaa1c783e0a204ed9f","bugs":{"url":"https://github.com/thejameskyle/import-inspector/issues"},"homepage":"https://github.com/thejameskyle/import-inspector#readme","_id":"import-inspector@1.0.1","scripts":{},"_shasum":"d7c451355053119f184c95655002eb170d5b97e8","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"d7c451355053119f184c95655002eb170d5b97e8","size":1845,"noattachment":false,"key":"/import-inspector/-/import-inspector-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/import-inspector/download/import-inspector-1.0.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-inspector-1.0.1.tgz_1497463289495_0.12858183938078582"},"directories":{},"publish_time":1497463289601,"_hasShrinkwrap":false,"_cnpm_publish_time":1497463289601,"_cnpmcore_publish_time":"2021-12-16T12:36:48.297Z"},"1.0.0":{"name":"import-inspector","version":"1.0.0","description":"Wrap dynamic imports with information about the import itself","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/import-inspector.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","devDependencies":{"flow-bin":"^0.48.0"},"gitHead":"39006eee52cffeb52c62480796cebc21bfb8979a","bugs":{"url":"https://github.com/thejameskyle/import-inspector/issues"},"homepage":"https://github.com/thejameskyle/import-inspector#readme","_id":"import-inspector@1.0.0","scripts":{},"_shasum":"e40a0f86c8dffc9cacfc76fb6e47e999c99128bc","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"e40a0f86c8dffc9cacfc76fb6e47e999c99128bc","size":2487,"noattachment":false,"key":"/import-inspector/-/import-inspector-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/import-inspector/download/import-inspector-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-inspector-1.0.0.tgz_1497463045205_0.5775984211359173"},"directories":{},"publish_time":1497463045289,"_hasShrinkwrap":false,"_cnpm_publish_time":1497463045289,"_cnpmcore_publish_time":"2021-12-16T12:36:48.546Z"}},"readme":"# import-inspector\n\n> Wrap dynamic imports with metadata about the import\n\n```js\nimport {inspect, report} from 'import-inspector';\n\nconst stopInspecting = inspect(metadata => {\n  console.log(metadata);\n});\n\nreport(import('./other-module'), { whatever: 42 });\n// log: { whatever: 42 }\n\nstopInspecting();\n```\n\n## API\n\n#### `inspect(callback)`\n\nAdd a callback to be called whenever the `report()` function is called.\nReceives `metadata` from `report()`.\n\nReturns a function `stopInspecting()` that will stop the `callback` from being\ncalled again.\n\n#### `report(promise, metadata)`\n\nWrap an import promise with some metadata to report.\n","_attachments":{},"homepage":"https://github.com/thejameskyle/import-inspector#readme","bugs":{"url":"https://github.com/thejameskyle/import-inspector/issues"},"license":"MIT"}