Skip to content

Latest commit

 

History

History
181 lines (146 loc) · 5.56 KB

README.md

File metadata and controls

181 lines (146 loc) · 5.56 KB

⚙️ mlly

github release npm codecov module type: esm license conventional commits typescript vitest yarn

ECMAScript module utilities.

Contents

What is this?

mlly is a set of ECMAScript module (ESM) utilities. It exposes several tools to bridge the gap between developer experience and the current state of ECMAScript modules.

Install

This package is ESM only.

In Node.js (version 18+) with yarn:

yarn add @flex-development/mlly
See Git - Protocols | Yarn  for details regarding installing from Git.

In Deno with esm.sh:

import { resolveModule } from 'https://esm.sh/@flex-development/mlly'

In browsers with esm.sh:

<script type="module">
  import { resolveModule } from 'https://esm.sh/@flex-development/mlly'
</script>

Use

import {
  canParseUrl,
  cwd,
  defaultConditions,
  defaultExtensions,
  defaultMainFields,
  extensionFormatMap,
  formats,
  getSource,
  isAbsoluteSpecifier,
  isArrayIndex,
  isBareSpecifier,
  isDirectory,
  isFile,
  isImportsSubpath,
  isRelativeSpecifier,
  legacyMainResolve,
  lookupPackageScope,
  moduleResolve,
  packageExportsResolve,
  packageImportsExportsResolve,
  packageImportsResolve,
  packageResolve,
  packageSelfResolve,
  packageTargetResolve,
  patternKeyCompare,
  patternMatch,
  readPackageJson,
  resolveAlias,
  resolveModule,
  resolver,
  root,
  toRelativeSpecifier,
  toUrl
} from '@flex-development/mlly'

API

This package exports the following identifiers:

There is no default export.

Types

This package is fully typed with TypeScript.

Interfaces

Type Aliases

Contribute

See CONTRIBUTING.md.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.