# @environment-safe/import-introspect

> When you need to look at the imports in a particular JS file and need to support many usage scenarios

Latest version **0.1.0** (published 2023-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @environment-safe/import-introspect
pnpm add @environment-safe/import-introspect
yarn add @environment-safe/import-introspect
bun add @environment-safe/import-introspect
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-07-13 |
| First published | 2023-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Abbey Hawk Sparrow |
| Maintainers | khrome |

## Links

- npm: https://www.npmjs.com/package/@environment-safe/import-introspect
- Repository: https://github.com/environment-safe/import-introspect
- Homepage: https://github.com/khrome/environment-safe-import-introspect
- Issues: https://api.github.com/repos/environment-safe/import-introspect/issues
- npm.io page: https://npm.io/package/@environment-safe/import-introspect

## Dependencies (2)

- [browser-or-node](https://npm.io/package/browser-or-node.md) ^2.1.1
- [es-module-lexer](https://npm.io/package/es-module-lexer.md) ^1.3.0

## Recent versions

- 0.1.0 (latest) — 2023-07-13

## README

@environment-safe/import-introspect
============================
When you need to look at the imports in a particular JS file and need to support many usage scenarios

Usage
-----

```javascript
    import { scanImports, setBaseDir } from '../src/index.mjs';
    
    const result = await scanImports('./test/test.mjs');
```

Testing
-------

Run the es module tests to test the root modules
```bash
npm run import-test
```
to run the same test inside the browser:

```bash
npm run browser-test
```
to run the same test headless in chrome:
```bash
npm run headless-browser-test
```

to run the same test inside docker:
```bash
npm run container-test
```

Run the commonjs tests against the `/dist` commonjs source (generated with the `build-commonjs` target).
```bash
npm run require-test
```

Development
-----------
All work is done in the .mjs files and will be transpiled on commit to commonjs and tested.

If the above tests pass, then attempt a commit which will generate .d.ts files alongside the `src` files and commonjs classes in `dist`

---
_Source: https://npm.io/package/@environment-safe/import-introspect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
