-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from ndaidong/6.1.1
v6.1.1
- Loading branch information
Showing
16 changed files
with
452 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,66 @@ | ||
// Type definitions | ||
|
||
export interface FeedEntry { | ||
link?: string; | ||
title?: string; | ||
description?: string; | ||
published?: Date; | ||
link?: string; | ||
title?: string; | ||
description?: string; | ||
published?: Date; | ||
} | ||
|
||
export interface FeedData { | ||
link?: string; | ||
title?: string; | ||
description?: string; | ||
generator?: string; | ||
language?: string; | ||
published?: Date; | ||
entries?: Array<FeedEntry>; | ||
link?: string; | ||
title?: string; | ||
description?: string; | ||
generator?: string; | ||
language?: string; | ||
published?: Date; | ||
entries?: Array<FeedEntry>; | ||
} | ||
|
||
export interface ProxyConfig { | ||
target?: string; | ||
headers?: string[]; | ||
} | ||
|
||
export interface ReaderOptions { | ||
/** | ||
* normalize feed data or keep original | ||
* default: true | ||
*/ | ||
normalization?: Boolean; | ||
normalization?: boolean; | ||
/** | ||
* include full content of feed entry if present | ||
* default: false | ||
*/ | ||
includeEntryContent?: Boolean; | ||
includeEntryContent?: boolean; | ||
/** | ||
* include optional elements if any | ||
* default: false | ||
*/ | ||
includeOptionalElements?: Boolean; | ||
includeOptionalElements?: boolean; | ||
/** | ||
* convert datetime to ISO format | ||
* default: true | ||
*/ | ||
useISODateFormat?: Boolean; | ||
useISODateFormat?: boolean; | ||
/** | ||
* to truncate description | ||
* default: 210 | ||
*/ | ||
descriptionMaxLen?: number; | ||
descriptionMaxLen?: number; | ||
} | ||
|
||
export interface FetchOptions { | ||
/** | ||
* list of request headers | ||
* default: null | ||
*/ | ||
headers?: string[]; | ||
/** | ||
* the values to configure proxy | ||
* default: null | ||
*/ | ||
proxy?: ProxyConfig; | ||
} | ||
|
||
export function read(url: string, options?: ReaderOptions): Promise<FeedData>; | ||
export function read(url: string, options?: ReaderOptions, fetchOptions?: FetchOptions): Promise<FeedData>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "feed-reader", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"main": "./feed-reader.js" | ||
} |
Oops, something went wrong.