rsshub
Version:
Make RSS Great Again!
22 lines (20 loc) • 743 B
JavaScript
import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs";
import { t as parseDate } from "./parse-date-BrP7mxXf.mjs";
import { t as timezone } from "./timezone-D8cuwzTY.mjs";
//#region lib/routes/alistapart/utils.ts
const getData = (url) => ofetch_default(url);
const getList = (data) => data.map((value) => {
const { id, title, content, date_gmt, modified_gmt, link, _embedded } = value;
return {
id,
title: title.rendered,
description: content.rendered,
link,
category: _embedded["wp:term"][0].map((v) => v.name),
author: _embedded.author.map((v) => v.name).join(", "),
pubDate: timezone(parseDate(date_gmt), 0),
updated: timezone(parseDate(modified_gmt), 0)
};
});
//#endregion
export { getList as n, getData as t };