feedsmith 2.0.0-next.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/common/config.d.ts +0 -1
- package/dist/common/config.js +0 -1
- package/dist/common/parse.d.ts +3 -3
- package/dist/common/parse.js +6 -6
- package/dist/feeds/rss/common/types.d.ts +0 -3
- package/dist/feeds/rss/generate/utils.js +0 -3
- package/dist/feeds/rss/parse/utils.js +0 -3
- package/package.json +2 -2
- package/dist/namespaces/source/common/types.d.ts +0 -32
- package/dist/namespaces/source/common/types.js +0 -2
- package/dist/namespaces/source/generate/utils.d.ts +0 -8
- package/dist/namespaces/source/generate/utils.js +0 -68
- package/dist/namespaces/source/parse/utils.d.ts +0 -8
- package/dist/namespaces/source/parse/utils.js +0 -69
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/feedsmith)
|
|
6
6
|
[](https://github.com/macieklamberski/feedsmith/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
-
Fast, all‑in‑one JavaScript parser and generator for RSS, Atom,
|
|
8
|
+
Fast, all‑in‑one JavaScript parser and generator for RSS, Atom, RDF, and JSON Feed, with support for popular namespaces and OPML files.
|
|
9
9
|
|
|
10
10
|
Feedsmith offers universal and format‑specific parsers that maintain the original feed structure in a clean, object-oriented format while intelligently normalizing legacy elements. Access all feed data without compromising simplicity.
|
|
11
11
|
|
|
@@ -59,8 +59,8 @@ Feedsmith aims to fully support all major feed formats and namespaces in complet
|
|
|
59
59
|
|--------|----------|---------|------------|
|
|
60
60
|
| [RSS](http://cyber.law.harvard.edu/rss/rss.html) | 0.9x, 2.0 | ✅ | ✅ |
|
|
61
61
|
| [Atom](https://tools.ietf.org/html/rfc4287) | 0.3, 1.0 | ✅ | ✅ |
|
|
62
|
-
| [JSON Feed](https://jsonfeed.org) | 1.0, 1.1 | ✅ | ✅ |
|
|
63
62
|
| [RDF](https://web.resource.org/rss/1.0/spec) | 0.9, 1.0 | ✅ | ⏳ |
|
|
63
|
+
| [JSON Feed](https://jsonfeed.org) | 1.0, 1.1 | ✅ | ✅ |
|
|
64
64
|
|
|
65
65
|
### Namespaces
|
|
66
66
|
|
|
@@ -78,7 +78,6 @@ Feedsmith aims to fully support all major feed formats and namespaces in complet
|
|
|
78
78
|
| [Atom Threading](https://www.ietf.org/rfc/rfc4685.txt) | `<thr:*>` | RSS, Atom | ✅ | ✅ |
|
|
79
79
|
| [Dublin Core Terms](http://purl.org/dc/terms/) | `<dcterms:*>` | RSS, Atom, RDF | ✅ | ✅ |
|
|
80
80
|
| [Well-Formed Web](http://wellformedweb.org/CommentAPI/) | `<wfw:*>` | RSS, Atom, RDF | ✅ | ✅ |
|
|
81
|
-
| [Source](http://source.scripting.com/) | `<source:*>` | RSS | ✅ | ✅ |
|
|
82
81
|
| [YouTube](https://www.youtube.com/feeds/videos.xml) | `<yt:*>` | Atom | ✅ | ✅ |
|
|
83
82
|
|
|
84
83
|
### Other
|
|
@@ -108,7 +107,7 @@ The simplest way to parse any feed is to use the universal `parseFeed` function:
|
|
|
108
107
|
```typescript
|
|
109
108
|
import { parseFeed } from 'feedsmith'
|
|
110
109
|
|
|
111
|
-
// Works with RSS, Atom,
|
|
110
|
+
// Works with RSS, Atom, RDF, and JSON Feed
|
|
112
111
|
const { format, feed } = parseFeed(feedContent)
|
|
113
112
|
|
|
114
113
|
console.log('Feed format:', format) // rss, atom, json, rdf
|
|
@@ -177,7 +176,6 @@ console.log(rss) // Complete RSS XML
|
|
|
177
176
|
// You can also generate other formats:
|
|
178
177
|
// - generateAtomFeed() for Atom feeds
|
|
179
178
|
// - generateJsonFeed() for JSON feeds
|
|
180
|
-
// - generateRdfFeed() for RDF feeds
|
|
181
179
|
// - generateOpml() for OPML files
|
|
182
180
|
```
|
|
183
181
|
|
package/dist/common/config.d.ts
CHANGED
package/dist/common/config.js
CHANGED
|
@@ -36,7 +36,6 @@ export const namespaceUrls = {
|
|
|
36
36
|
podcast: 'https://podcastindex.org/namespace/1.0',
|
|
37
37
|
rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
|
38
38
|
slash: 'http://purl.org/rss/1.0/modules/slash/',
|
|
39
|
-
source: 'http://source.scripting.com/',
|
|
40
39
|
sy: 'http://purl.org/rss/1.0/modules/syndication/',
|
|
41
40
|
thr: 'http://purl.org/syndication/thread/1.0',
|
|
42
41
|
wfw: 'http://wellformedweb.org/CommentAPI/',
|
package/dist/common/parse.d.ts
CHANGED
|
@@ -4,9 +4,6 @@ import type { Feed as RdfFeed } from '../feeds/rdf/common/types.js';
|
|
|
4
4
|
import type { Feed as RssFeed } from '../feeds/rss/common/types.js';
|
|
5
5
|
import type { DeepPartial } from './types.js';
|
|
6
6
|
export type Feed = {
|
|
7
|
-
format: 'json';
|
|
8
|
-
feed: DeepPartial<JsonFeed<string>>;
|
|
9
|
-
} | {
|
|
10
7
|
format: 'rss';
|
|
11
8
|
feed: DeepPartial<RssFeed<string>>;
|
|
12
9
|
} | {
|
|
@@ -15,5 +12,8 @@ export type Feed = {
|
|
|
15
12
|
} | {
|
|
16
13
|
format: 'rdf';
|
|
17
14
|
feed: DeepPartial<RdfFeed<string>>;
|
|
15
|
+
} | {
|
|
16
|
+
format: 'json';
|
|
17
|
+
feed: DeepPartial<JsonFeed<string>>;
|
|
18
18
|
};
|
|
19
19
|
export declare const parse: (value: unknown) => Feed;
|
package/dist/common/parse.js
CHANGED
|
@@ -8,17 +8,17 @@ import { detect as detectRssFeed } from '../feeds/rss/detect/index.js';
|
|
|
8
8
|
import { parse as parseRssFeed } from '../feeds/rss/parse/index.js';
|
|
9
9
|
import { locales } from './config.js';
|
|
10
10
|
export const parse = (value) => {
|
|
11
|
-
if (detectAtomFeed(value)) {
|
|
12
|
-
return { format: 'atom', feed: parseAtomFeed(value) };
|
|
13
|
-
}
|
|
14
|
-
if (detectJsonFeed(value)) {
|
|
15
|
-
return { format: 'json', feed: parseJsonFeed(value) };
|
|
16
|
-
}
|
|
17
11
|
if (detectRssFeed(value)) {
|
|
18
12
|
return { format: 'rss', feed: parseRssFeed(value) };
|
|
19
13
|
}
|
|
14
|
+
if (detectAtomFeed(value)) {
|
|
15
|
+
return { format: 'atom', feed: parseAtomFeed(value) };
|
|
16
|
+
}
|
|
20
17
|
if (detectRdfFeed(value)) {
|
|
21
18
|
return { format: 'rdf', feed: parseRdfFeed(value) };
|
|
22
19
|
}
|
|
20
|
+
if (detectJsonFeed(value)) {
|
|
21
|
+
return { format: 'json', feed: parseJsonFeed(value) };
|
|
22
|
+
}
|
|
23
23
|
throw new Error(locales.unrecognized);
|
|
24
24
|
};
|
|
@@ -8,7 +8,6 @@ import type { Feed as ItunesFeed, Item as ItunesItem } from '../../../namespaces
|
|
|
8
8
|
import type { ItemOrFeed as MediaItemOrFeed } from '../../../namespaces/media/common/types.js';
|
|
9
9
|
import type { Feed as PodcastFeed, Item as PodcastItem } from '../../../namespaces/podcast/common/types.js';
|
|
10
10
|
import type { Item as SlashItem } from '../../../namespaces/slash/common/types.js';
|
|
11
|
-
import type { Feed as SourceFeed, Item as SourceItem } from '../../../namespaces/source/common/types.js';
|
|
12
11
|
import type { Feed as SyFeed } from '../../../namespaces/sy/common/types.js';
|
|
13
12
|
import type { Item as ThrItem } from '../../../namespaces/thr/common/types.js';
|
|
14
13
|
import type { Item as WfwItem } from '../../../namespaces/wfw/common/types.js';
|
|
@@ -75,7 +74,6 @@ export type Item<TDate extends DateLike> = {
|
|
|
75
74
|
georss?: GeoRssItemOrFeed;
|
|
76
75
|
thr?: ThrItem;
|
|
77
76
|
wfw?: WfwItem;
|
|
78
|
-
src?: SourceItem;
|
|
79
77
|
} & ({
|
|
80
78
|
title: string;
|
|
81
79
|
} | {
|
|
@@ -110,5 +108,4 @@ export type Feed<TDate extends DateLike> = {
|
|
|
110
108
|
podcast?: PodcastFeed<TDate>;
|
|
111
109
|
media?: MediaItemOrFeed;
|
|
112
110
|
georss?: GeoRssItemOrFeed;
|
|
113
|
-
src?: SourceFeed;
|
|
114
111
|
};
|
|
@@ -9,7 +9,6 @@ import { generateFeed as generateItunesFeed, generateItem as generateItunesItem,
|
|
|
9
9
|
import { generateItemOrFeed as generateMediaItemOrFeed } from '../../../namespaces/media/generate/utils.js';
|
|
10
10
|
import { generateFeed as generatePodcastFeed, generateItem as generatePodcastItem, } from '../../../namespaces/podcast/generate/utils.js';
|
|
11
11
|
import { generateItem as generateSlashItem } from '../../../namespaces/slash/generate/utils.js';
|
|
12
|
-
import { generateFeed as generateSourceFeed, generateItem as generateSourceItem, } from '../../../namespaces/source/generate/utils.js';
|
|
13
12
|
import { generateFeed as generateSyFeed } from '../../../namespaces/sy/generate/utils.js';
|
|
14
13
|
import { generateItem as generateThrItem } from '../../../namespaces/thr/generate/utils.js';
|
|
15
14
|
import { generateItem as generateWfwItem } from '../../../namespaces/wfw/generate/utils.js';
|
|
@@ -131,7 +130,6 @@ export const generateItem = (item) => {
|
|
|
131
130
|
...generateGeoRssItemOrFeed(item.georss),
|
|
132
131
|
...generateThrItem(item.thr),
|
|
133
132
|
...generateWfwItem(item.wfw),
|
|
134
|
-
...generateSourceItem(item.src),
|
|
135
133
|
};
|
|
136
134
|
return trimObject(value);
|
|
137
135
|
};
|
|
@@ -167,7 +165,6 @@ export const generateFeed = (feed) => {
|
|
|
167
165
|
...generatePodcastFeed(feed.podcast),
|
|
168
166
|
...generateMediaItemOrFeed(feed.media),
|
|
169
167
|
...generateGeoRssItemOrFeed(feed.georss),
|
|
170
|
-
...generateSourceFeed(feed.src),
|
|
171
168
|
item: trimArray(feed.items, generateItem),
|
|
172
169
|
};
|
|
173
170
|
const trimmedValue = trimObject(value);
|
|
@@ -8,7 +8,6 @@ import { retrieveFeed as retrieveItunesFeed, retrieveItem as retrieveItunesItem,
|
|
|
8
8
|
import { retrieveItemOrFeed as retrieveMediaItemOrFeed } from '../../../namespaces/media/parse/utils.js';
|
|
9
9
|
import { retrieveFeed as retrievePodcastFeed, retrieveItem as retrievePodcastItem, } from '../../../namespaces/podcast/parse/utils.js';
|
|
10
10
|
import { retrieveItem as retrieveSlashItem } from '../../../namespaces/slash/parse/utils.js';
|
|
11
|
-
import { retrieveFeed as retrieveSourceFeed, retrieveItem as retrieveSourceItem, } from '../../../namespaces/source/parse/utils.js';
|
|
12
11
|
import { retrieveFeed as retrieveSyFeed } from '../../../namespaces/sy/parse/utils.js';
|
|
13
12
|
import { retrieveItem as retrieveThrItem } from '../../../namespaces/thr/parse/utils.js';
|
|
14
13
|
import { retrieveItem as retrieveWfwItem } from '../../../namespaces/wfw/parse/utils.js';
|
|
@@ -119,7 +118,6 @@ export const parseItem = (value) => {
|
|
|
119
118
|
georss: namespaces.has('georss') ? retrieveGeoRssItemOrFeed(value) : undefined,
|
|
120
119
|
thr: namespaces.has('thr') ? retrieveThrItem(value) : undefined,
|
|
121
120
|
wfw: namespaces.has('wfw') ? retrieveWfwItem(value) : undefined,
|
|
122
|
-
src: namespaces.has('source') ? retrieveSourceItem(value) : undefined,
|
|
123
121
|
};
|
|
124
122
|
return trimObject(item);
|
|
125
123
|
};
|
|
@@ -157,7 +155,6 @@ export const parseFeed = (value) => {
|
|
|
157
155
|
podcast: namespaces.has('podcast') ? retrievePodcastFeed(value) : undefined,
|
|
158
156
|
media: namespaces.has('media') ? retrieveMediaItemOrFeed(value) : undefined,
|
|
159
157
|
georss: namespaces.has('georss') ? retrieveGeoRssItemOrFeed(value) : undefined,
|
|
160
|
-
src: namespaces.has('source') ? retrieveSourceFeed(value) : undefined,
|
|
161
158
|
};
|
|
162
159
|
return trimObject(feed);
|
|
163
160
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feedsmith",
|
|
3
|
-
"description": "Fast, all‑in‑one parser and generator for RSS, Atom,
|
|
3
|
+
"description": "Fast, all‑in‑one parser and generator for RSS, Atom, RDF, and JSON Feed, with support for Podcast, iTunes, Dublin Core, and OPML files.",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/macieklamberski/feedsmith.git"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"vitepress": "^1.6.4",
|
|
64
64
|
"vitepress-plugin-llms": "^1.7.3"
|
|
65
65
|
},
|
|
66
|
-
"version": "2.0.0
|
|
66
|
+
"version": "2.0.0"
|
|
67
67
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export type Account = {
|
|
2
|
-
service: string;
|
|
3
|
-
value?: string;
|
|
4
|
-
};
|
|
5
|
-
export type Likes = {
|
|
6
|
-
server: string;
|
|
7
|
-
};
|
|
8
|
-
export type Archive = {
|
|
9
|
-
url: string;
|
|
10
|
-
startDay: string;
|
|
11
|
-
endDay?: string;
|
|
12
|
-
filename?: string;
|
|
13
|
-
};
|
|
14
|
-
export type SubscriptionList = {
|
|
15
|
-
url: string;
|
|
16
|
-
value?: string;
|
|
17
|
-
};
|
|
18
|
-
export type Feed = {
|
|
19
|
-
accounts?: Array<Account>;
|
|
20
|
-
likes?: Likes;
|
|
21
|
-
archive?: Archive;
|
|
22
|
-
subscriptionLists?: Array<SubscriptionList>;
|
|
23
|
-
cloud?: string;
|
|
24
|
-
blogroll?: string;
|
|
25
|
-
self?: string;
|
|
26
|
-
};
|
|
27
|
-
export type Item = {
|
|
28
|
-
markdown?: string;
|
|
29
|
-
outlines?: Array<string>;
|
|
30
|
-
localTime?: string;
|
|
31
|
-
linkFull?: string;
|
|
32
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { GenerateFunction } from '../../../common/types.js';
|
|
2
|
-
import type { Account, Archive, Feed, Item, Likes, SubscriptionList } from '../common/types.js';
|
|
3
|
-
export declare const generateAccount: GenerateFunction<Account>;
|
|
4
|
-
export declare const generateLikes: GenerateFunction<Likes>;
|
|
5
|
-
export declare const generateArchive: GenerateFunction<Archive>;
|
|
6
|
-
export declare const generateSubscriptionList: GenerateFunction<SubscriptionList>;
|
|
7
|
-
export declare const generateFeed: GenerateFunction<Feed>;
|
|
8
|
-
export declare const generateItem: GenerateFunction<Item>;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { generateCdataString, generatePlainString, isNonEmptyString, isObject, trimArray, trimObject, } from '../../../common/utils.js';
|
|
2
|
-
export const generateAccount = (account) => {
|
|
3
|
-
if (!isObject(account) || !isNonEmptyString(account.service)) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
const value = {
|
|
7
|
-
'@service': account.service,
|
|
8
|
-
'#text': generatePlainString(account.value),
|
|
9
|
-
};
|
|
10
|
-
return trimObject(value);
|
|
11
|
-
};
|
|
12
|
-
export const generateLikes = (likes) => {
|
|
13
|
-
if (!isObject(likes) || !isNonEmptyString(likes.server)) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
'@server': likes.server,
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export const generateArchive = (archive) => {
|
|
21
|
-
if (!isObject(archive) || !isNonEmptyString(archive.url) || !isNonEmptyString(archive.startDay)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const value = {
|
|
25
|
-
'source:url': archive.url,
|
|
26
|
-
'source:startDay': archive.startDay,
|
|
27
|
-
'source:endDay': generatePlainString(archive.endDay),
|
|
28
|
-
'source:filename': generatePlainString(archive.filename),
|
|
29
|
-
};
|
|
30
|
-
return trimObject(value);
|
|
31
|
-
};
|
|
32
|
-
export const generateSubscriptionList = (subscriptionList) => {
|
|
33
|
-
if (!isObject(subscriptionList) || !isNonEmptyString(subscriptionList.url)) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const value = {
|
|
37
|
-
'@url': subscriptionList.url,
|
|
38
|
-
'#text': generatePlainString(subscriptionList.value),
|
|
39
|
-
};
|
|
40
|
-
return trimObject(value);
|
|
41
|
-
};
|
|
42
|
-
export const generateFeed = (feed) => {
|
|
43
|
-
if (!isObject(feed)) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const value = {
|
|
47
|
-
'source:account': trimArray(feed.accounts, generateAccount),
|
|
48
|
-
'source:likes': generateLikes(feed.likes),
|
|
49
|
-
'source:archive': generateArchive(feed.archive),
|
|
50
|
-
'source:subscriptionList': trimArray(feed.subscriptionLists, generateSubscriptionList),
|
|
51
|
-
'source:cloud': generatePlainString(feed.cloud),
|
|
52
|
-
'source:blogroll': generatePlainString(feed.blogroll),
|
|
53
|
-
'source:self': generatePlainString(feed.self),
|
|
54
|
-
};
|
|
55
|
-
return trimObject(value);
|
|
56
|
-
};
|
|
57
|
-
export const generateItem = (item) => {
|
|
58
|
-
if (!isObject(item)) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const value = {
|
|
62
|
-
'source:markdown': generateCdataString(item.markdown),
|
|
63
|
-
'source:outline': trimArray(item.outlines, generateCdataString),
|
|
64
|
-
'source:localTime': generatePlainString(item.localTime),
|
|
65
|
-
'source:linkFull': generatePlainString(item.linkFull),
|
|
66
|
-
};
|
|
67
|
-
return trimObject(value);
|
|
68
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ParsePartialFunction } from '../../../common/types.js';
|
|
2
|
-
import type { Account, Archive, Feed, Item, Likes, SubscriptionList } from '../common/types.js';
|
|
3
|
-
export declare const parseAccount: ParsePartialFunction<Account>;
|
|
4
|
-
export declare const parseLikes: ParsePartialFunction<Likes>;
|
|
5
|
-
export declare const parseArchive: ParsePartialFunction<Archive>;
|
|
6
|
-
export declare const parseSubscriptionList: ParsePartialFunction<SubscriptionList>;
|
|
7
|
-
export declare const retrieveFeed: ParsePartialFunction<Feed>;
|
|
8
|
-
export declare const retrieveItem: ParsePartialFunction<Item>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { isObject, parseArrayOf, parseSingularOf, parseString, retrieveText, trimObject, } from '../../../common/utils.js';
|
|
2
|
-
export const parseAccount = (value) => {
|
|
3
|
-
if (!isObject(value)) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
const account = {
|
|
7
|
-
service: parseString(value['@service']),
|
|
8
|
-
value: parseString(retrieveText(value)),
|
|
9
|
-
};
|
|
10
|
-
return trimObject(account);
|
|
11
|
-
};
|
|
12
|
-
export const parseLikes = (value) => {
|
|
13
|
-
if (!isObject(value)) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const likes = {
|
|
17
|
-
server: parseString(value['@server']),
|
|
18
|
-
};
|
|
19
|
-
return trimObject(likes);
|
|
20
|
-
};
|
|
21
|
-
export const parseArchive = (value) => {
|
|
22
|
-
if (!isObject(value)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const archive = {
|
|
26
|
-
url: parseSingularOf(value['source:url'], (value) => parseString(retrieveText(value))),
|
|
27
|
-
startDay: parseSingularOf(value['source:startday'], (value) => parseString(retrieveText(value))),
|
|
28
|
-
endDay: parseSingularOf(value['source:endday'], (value) => parseString(retrieveText(value))),
|
|
29
|
-
filename: parseSingularOf(value['source:filename'], (value) => parseString(retrieveText(value))),
|
|
30
|
-
};
|
|
31
|
-
return trimObject(archive);
|
|
32
|
-
};
|
|
33
|
-
export const parseSubscriptionList = (value) => {
|
|
34
|
-
if (!isObject(value)) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const subscriptionList = {
|
|
38
|
-
url: parseString(value['@url']),
|
|
39
|
-
value: parseString(retrieveText(value)),
|
|
40
|
-
};
|
|
41
|
-
return trimObject(subscriptionList);
|
|
42
|
-
};
|
|
43
|
-
export const retrieveFeed = (value) => {
|
|
44
|
-
if (!isObject(value)) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const feed = {
|
|
48
|
-
accounts: parseArrayOf(value['source:account'], parseAccount),
|
|
49
|
-
likes: parseSingularOf(value['source:likes'], parseLikes),
|
|
50
|
-
archive: parseSingularOf(value['source:archive'], parseArchive),
|
|
51
|
-
subscriptionLists: parseArrayOf(value['source:subscriptionlist'], parseSubscriptionList),
|
|
52
|
-
cloud: parseSingularOf(value['source:cloud'], (value) => parseString(retrieveText(value))),
|
|
53
|
-
blogroll: parseSingularOf(value['source:blogroll'], (value) => parseString(retrieveText(value))),
|
|
54
|
-
self: parseSingularOf(value['source:self'], (value) => parseString(retrieveText(value))),
|
|
55
|
-
};
|
|
56
|
-
return trimObject(feed);
|
|
57
|
-
};
|
|
58
|
-
export const retrieveItem = (value) => {
|
|
59
|
-
if (!isObject(value)) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const item = {
|
|
63
|
-
markdown: parseSingularOf(value['source:markdown'], (value) => parseString(retrieveText(value))),
|
|
64
|
-
outlines: parseArrayOf(value['source:outline'], (value) => parseString(retrieveText(value))),
|
|
65
|
-
localTime: parseSingularOf(value['source:localtime'], (value) => parseString(retrieveText(value))),
|
|
66
|
-
linkFull: parseSingularOf(value['source:linkfull'], (value) => parseString(retrieveText(value))),
|
|
67
|
-
};
|
|
68
|
-
return trimObject(item);
|
|
69
|
-
};
|