Skip to content

Commit 0acc9bf

Browse files
committed
fix: fix isUrl logic
1 parent db47629 commit 0acc9bf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { CheerioAPI } from 'cheerio'
22
import consola from 'consola'
33
import { readUrl } from 'dl-vampire'
44
import fse from 'fs-extra'
5-
import is from 'is_js'
65
import less from 'less'
76
import path from 'path'
87
import sass from 'sass'
@@ -30,7 +29,7 @@ export function cleanUp($: CheerioAPI) {
3029
})
3130
}
3231

33-
export const isUrl = (u: string) => is.url(u) as boolean
32+
export const isUrl = (url: string) => /^https?:\/\//.test(url)
3433

3534
export const read = (file: string) => fse.readFileSync(file, 'utf-8')
3635

0 commit comments

Comments
 (0)