npm2url
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

npm2url

npm version npm downloads bundle JSDocs

Convert an NPM package import into a CDN URL.

Usage

Install package:

pnpm install npm2url

Import:

import { urlBuilder } from "npm2url";

const url: string = urlBuilder.getFullUrl('npm2url');
const url: string = urlBuilder.getFullUrl('npm2url', 'jsdelivr');

// find the fastest provider
await urlBuilder.findFastestProvider();
const fastestUrl = urlBuilder.getFullUrl('npm2url');

// find the fastest provider temporarily
const fastest = await urlBuilder.getFastestProvider();
const fastestUrl = urlBuilder.getFullUrl('npm2url', fastest);

License

Made with 💛

Published under MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i npm2url

Weekly Downloads

9,874

Version

0.2.4

License

MIT

Unpacked Size

8.44 kB

Total Files

6

Last publish

Collaborators

  • gera2ld