Socket
Socket
Sign inDemoInstall

podcast-xml-parser

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

podcast-xml-parser - npm Package Compare versions

Comparing version 3.0.0-beta.8 to 3.0.0-beta.9

5

lib/core/podcastOpmlParser.d.ts

@@ -9,2 +9,5 @@ /// <reference types="node" />

*/
export declare const podcastOpmlParser: (source: URL | string) => Promise<string[]>;
export declare const podcastOpmlParser: (source: URL | string) => Promise<{
title?: string;
url: string;
}[]>;

9

lib/transform/transformOpml.d.ts
/**
* Transforms parsed OPML XML data into an array of feed URLs.
* Transforms parsed OPML XML data into an array of objects containing feed URLs and titles.
*
* @param xmlText - The OPML XML data as a string.
* @returns An array of feed URLs extracted from the OPML data.
* @returns An array of objects with each object containing a feed URL and an optional title.
* @throws If the expected XML structure is not found.
*/
export declare function transformOpml(xmlText: string): string[];
export declare function transformOpml(xmlText: string): {
title?: string;
url: string;
}[];

@@ -6,6 +6,6 @@ "use strict";

/**
* Transforms parsed OPML XML data into an array of feed URLs.
* Transforms parsed OPML XML data into an array of objects containing feed URLs and titles.
*
* @param xmlText - The OPML XML data as a string.
* @returns An array of feed URLs extracted from the OPML data.
* @returns An array of objects with each object containing a feed URL and an optional title.
* @throws If the expected XML structure is not found.

@@ -37,5 +37,9 @@ */

}
const feedUrls = outlines.map((outline) => outline["@_xmlUrl"]).filter((url) => !!url);
return feedUrls;
return outlines
.filter((outline) => outline["@_xmlUrl"] !== undefined)
.map((outline) => ({
title: outline["@_text"],
url: outline["@_xmlUrl"],
}));
}
exports.transformOpml = transformOpml;
{
"name": "podcast-xml-parser",
"version": "3.0.0-beta.8",
"version": "3.0.0-beta.9",
"description": "🎙 Parse podcast feeds in browsers, React Native, or Node.js environments.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -85,3 +85,3 @@ <!-- HIDE_SECTION_START -->

**Purpose**: Parses an OPML outline to extract podcast feed URLs.
**Purpose**: Parses an OPML outline to extract podcast feed URLs and optional titles.

@@ -93,3 +93,3 @@ **Parameters**:

**Returns**:
A promise that resolves with an array of feed URLs extracted from the OPML outline.
A promise that resolves with an array of objects, each containing a feed URL and an optional title extracted from the OPML outline.

@@ -99,3 +99,3 @@ **Signature**:

```typescript
podcastOpmlParser(source: URL | string): Promise<string[]>
podcastOpmlParser(source: URL | string): Promise<{ title?: string; url: string }[]>
```

@@ -102,0 +102,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc