@file-services/resolve
TypeScript icon, indicating that this package has built-in type declarations

9.4.1 • Public • Published

@file-services/resolve

npm version package size

Isomorphic, fs-agnostic implementation of the Node resolution algorithm.

Implements the following behaviors:

Getting started

Install library in project:

npm i @file-services/resolve

Then, use the programmatic API:

import { createRequestResolver } from "@file-services/resolve";
import { createMemoryFs } from "@file-services/memory";

const fs = createMemoryFs({
  "some-folder": {
    "index.js": "some content",
  },
});

const resolveRequest = createRequestResolver({ fs });

resolveRequest("/", "./some-folder");
// === '/some-folder/index.js'

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @file-services/resolve

Weekly Downloads

1,236

Version

9.4.1

License

MIT

Unpacked Size

142 kB

Total Files

19

Last publish

Collaborators

  • avi.vahl
  • pistolpete_
  • tomermes
  • cijoe