mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix: type
This commit is contained in:
parent
4d2e0c3471
commit
2b07f16514
@ -1,6 +1,6 @@
|
|||||||
import type { RSSInfo } from "@shared/types"
|
|
||||||
import { XMLParser } from "fast-xml-parser"
|
import { XMLParser } from "fast-xml-parser"
|
||||||
import { $fetch } from "ofetch"
|
import { $fetch } from "ofetch"
|
||||||
|
import type { RSSInfo } from "../types"
|
||||||
|
|
||||||
export async function rss2json(url: string): Promise<RSSInfo | undefined> {
|
export async function rss2json(url: string): Promise<RSSInfo | undefined> {
|
||||||
if (!/^https?:\/\/[^\s$.?#].\S*/i.test(url)) return
|
if (!/^https?:\/\/[^\s$.?#].\S*/i.test(url)) return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user