JSPM

parse-import-specifiers

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9045
  • Score
    100M100P100Q131492F
  • License MIT

Simplest possible way to parse ImportSpecifiers

Package Exports

  • parse-import-specifiers
  • parse-import-specifiers/lib/parse-import-specifiers.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-import-specifiers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

parse-import-specifiers NPM version

Parse ImportSpecifiers to 3 arrays according to type.

Install

npm i parse-import-specifiers

API

const {
    defaults,
    namespaces,
    imports,
} = parseSpecifiers(specifiers);

for (const spec of defaults) {}

for (const spec of namespaces) {}

for (const spec of imports) {}

License

MIT