github-to-cdn
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

github-to-cdn

Mainly convert github address to cdn address to speed up the website. cdn by jsdelivr.com

Support site types

exmaples

import ghCDN from 'github-to-cdn'

// the reutrn `string` type

const linkToObject = ghCDN({
  username: 'd1y',
  repo: 'ass-we-can',
  path: 'src/lite.json',
  branch: 'master'
})

const linkToString = ghCDN(`https://github.com/d1y/ass-we-can/blob/master/src/lite.json`)

console.log(linkToObject)
console.log(linkToString)

Readme

Keywords

Package Sidebar

Install

npm i github-to-cdn

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

5.24 kB

Total Files

4

Last publish

Collaborators

  • d1y