feedsmith 1.5.0 → 1.5.1
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 +8 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/feedsmith)
|
|
5
5
|
[](https://github.com/macieklamberski/feedsmith/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
Modern JavaScript utility for parsing and generating JSON Feed, Atom, RSS, and RDF feeds, with support for popular namespaces. It provides both universal and format-specific parsers that
|
|
7
|
+
Modern JavaScript utility for parsing and generating JSON Feed, Atom, RSS, and RDF feeds, with support for popular namespaces. It provides both universal and format-specific parsers that maintain the original feed structure while offering helpful normalization.
|
|
8
8
|
|
|
9
|
-
Feedsmith
|
|
9
|
+
Feedsmith maintains the original feed structure in a clean, object-oriented format. It intelligently normalizes legacy elements, providing you with complete access to all feed data without compromising simplicity.
|
|
10
10
|
|
|
11
11
|
[Features](#supported-feeds-and-namespaces)
|
|
12
12
|
·
|
|
@@ -27,7 +27,7 @@ Feedsmith preserves the original feed structure in a clean object-oriented forma
|
|
|
27
27
|
* **CaSe INSENsiTive** — Handles JSON properties and XML tags in any case (lowercase, uppercase, mixed).
|
|
28
28
|
|
|
29
29
|
#### Performance and type-safety
|
|
30
|
-
* **Fast parsing** — Built on
|
|
30
|
+
* **Fast parsing** — Built on fast-xml-parser, it's one of the fastest feed parsers in JavaScript (see [benchmarks](#benchmarks)).
|
|
31
31
|
* **Type-safe API** — TypeScript type definitions are available for each feed format, making it easy to work with the data.
|
|
32
32
|
* **Tree-shakable** — Only include the parts of the library you need, reducing bundle size.
|
|
33
33
|
* **Well-tested** — Comprehensive test suite with over 450 tests and 99.9% code coverage.
|
|
@@ -324,10 +324,9 @@ Returns:
|
|
|
324
324
|
```
|
|
325
325
|
</details>
|
|
326
326
|
|
|
327
|
-
For more examples, check the _*/references_ folders
|
|
327
|
+
For more examples, check the _*/references_ folders in the source code. There, you'll find the complete objects returned from the parser functions for the various feed formats and versions.
|
|
328
328
|
|
|
329
329
|
* Atom examples: [src/feeds/atom/references](https://github.com/macieklamberski/feedsmith/blob/main/src/feeds/atom/references),
|
|
330
|
-
* JSON examples: [src/feeds/json/references](https://github.com/macieklamberski/feedsmith/blob/main/src/feeds/json/references),
|
|
331
330
|
* RSS examples: [src/feeds/rss/references](https://github.com/macieklamberski/feedsmith/blob/main/src/feeds/rss/references),
|
|
332
331
|
* RDF examples: [src/feeds/rdf/references](https://github.com/macieklamberski/feedsmith/blob/main/src/feeds/rdf/references).
|
|
333
332
|
|
|
@@ -376,7 +375,7 @@ if (detectRdfFeed(content)) {
|
|
|
376
375
|
```
|
|
377
376
|
|
|
378
377
|
> [!WARNING]
|
|
379
|
-
> Detect functions are designed to quickly identify the
|
|
378
|
+
> Detect functions are designed to quickly identify the feed format by looking for its signature, such as the `<rss>` tag in the case of RSS feeds. However, the function may detect an RSS feed even if it is invalid. The feed will be fully validated only when using the `parseRssFeed` function.
|
|
380
379
|
|
|
381
380
|
## Generating feeds
|
|
382
381
|
|
|
@@ -384,11 +383,11 @@ The functionality for generating feeds is currently under development and will b
|
|
|
384
383
|
|
|
385
384
|
## Benchmarks
|
|
386
385
|
|
|
387
|
-
A comprehensive set of benchmarks,
|
|
386
|
+
A comprehensive set of benchmarks, categorized by various file sizes, is available in the _/benchmarks_ directory. These benchmarks were conducted using both Tinybench and Benchmark.js.
|
|
388
387
|
|
|
389
388
|
[See full benchmark results →](benchmarks/README.md)
|
|
390
389
|
|
|
391
|
-
For a quick overview, here are the results of parsing RSS, Atom and RDF feeds
|
|
390
|
+
For a quick overview, here are the results of parsing RSS, Atom, and RDF feeds using various JS packages with Tinybench. Feedsmith's results are marked with an asterisk (`*`).
|
|
392
391
|
|
|
393
392
|
```
|
|
394
393
|
📊 RSS feed parsing (50 files × 100KB — 5MB)
|
|
@@ -449,7 +448,7 @@ While this approach can be useful for quick reading of feed data, it often resul
|
|
|
449
448
|
|
|
450
449
|
### Why are date fields returned as strings?
|
|
451
450
|
|
|
452
|
-
In the course of parsing hundreds of thousands of feeds, I have found that dates in feeds use many different formats. Rather than attempting to parse them all (and potentially introducing errors), dates are returned in their original string form
|
|
451
|
+
In the course of parsing hundreds of thousands of feeds, I have found that dates in feeds use many different formats. Rather than attempting to parse them all (and potentially introducing errors), dates are returned in their original string form. This approach allows you to use your preferred date parsing library or simply the `Date` object.
|
|
453
452
|
|
|
454
453
|
### Does Feedsmith validate feeds?
|
|
455
454
|
|
package/package.json
CHANGED