# deno-importmap

> Resolve specifiers with import maps.

Latest version **0.2.1** (published 2022-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install deno-importmap
pnpm add deno-importmap
yarn add deno-importmap
bun add deno-importmap
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2022-12-07 |
| First published | 2020-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 85.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Dalci de Jesus Bagolin |
| Maintainers | dalcib |
| Keywords | importmap, importmaps, import-map, import-maps, deno |

## Links

- npm: https://www.npmjs.com/package/deno-importmap
- Repository: https://github.com/dalcib/deno-importmap
- Homepage: https://github.com/dalcib/deno-importmap#readme
- Issues: https://github.com/dalcib/deno-importmap/issues
- npm.io page: https://npm.io/package/deno-importmap

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^18.11.9

## Recent versions

- 0.2.1 (latest) — 2022-12-07
- 0.1.6 — 2021-04-13
- 0.1.5 — 2021-01-15
- 0.1.4 — 2021-01-07
- 0.1.0 — 2020-12-09

## README

# ImportMap

Implementation of [import maps](https://github.com/WICG/import-maps).

This is a port of the Deno module [importmap](https://deno.land/x/importmap) to Nodejs.

## Example

```ts
import {
  resolveImportMap,
  resolveModuleSpecifier,
} from "deno-importmap";

const importMap: ImportMap = {
  imports: {
    "./foo/": "./bar/",
  },
};
const importMapBaseURL = new URL(import.meta.url);
const moduleSpecifier = "./foo/test.js";
const baseURL = new URL(import.meta.url);
const resolvedImportMap = resolveImportMap(importMap, importMapBaseURL); // { imports: { "file:///project/dir/foo/": "file:///project/dir/bar/" }, scopes: {} }
const resolvedeModuleSpecifier = resolveModuleSpecifier(
  moduleSpecifier,
  resolvedImportMap,
  baseURL,
); // file:///project/dir/bar/test.js
```

---
_Source: https://npm.io/package/deno-importmap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
