generate-cdn
v1.0.0
Published
Generate CDN links from GitHub & unpkg (open-source) URLs
Downloads
5
Maintainers
Readme
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/[email protected]/dist/boxicons.js';
const cdnLink2 = unpkgCDN(unpkgUrl);
console.log(cdnLink2);