generate-cdn

1.0.0 • Public • Published

generate-cdn

Generate CDN links from GitHub & unpkg (open-source) URLs

Installation

npm i generate-cdn

Usage

const { githubCDN, unpkgCDN } = require('generate-cdn');

Generate CDN Link from GitHub URL

const githubUrl = 'https://github.com/AnshSinghSonkhia/thousand-colors/blob/main/index.js';
const cdnLink = githubCDN(githubUrl);
console.log(cdnLink);

Generate CDN Link from unpkg URL

const unpkgUrl = 'https://unpkg.com/boxicons@2.1.4/dist/boxicons.js';
const cdnLink2 = unpkgCDN(unpkgUrl);
console.log(cdnLink2);

Package Sidebar

Install

npm i generate-cdn

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Unpacked Size

14.5 kB

Total Files

5

Last publish

Collaborators

  • anshsinghsonkhia