From 9430b91f0c4edd06cd4c1767a3dc5e3bc018575c Mon Sep 17 00:00:00 2001 From: Eric Aguayo Date: Wed, 16 Oct 2024 11:39:25 -0500 Subject: [PATCH 1/2] Makes `parse` function public --- src/assets/sitemapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/sitemapper.js b/src/assets/sitemapper.js index 811f443..e7a98c7 100644 --- a/src/assets/sitemapper.js +++ b/src/assets/sitemapper.js @@ -173,7 +173,7 @@ export default class Sitemapper { /** * Requests the URL and uses parseStringPromise to parse through and find the data * - * @private + * @public * @param {string} [url] - the Sitemaps url (e.g https://wp.seantburke.com/sitemap.xml) * @returns {Promise} */ From caaeec22a03f02ee175a28f9940124dbcce616ba Mon Sep 17 00:00:00 2001 From: Eric Aguayo Date: Wed, 16 Oct 2024 14:34:26 -0500 Subject: [PATCH 2/2] Added parse to API --- sitemapper.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sitemapper.d.ts b/sitemapper.d.ts index 67dc261..c44a09c 100644 --- a/sitemapper.d.ts +++ b/sitemapper.d.ts @@ -34,6 +34,13 @@ declare class Sitemapper { * @param url URL to the sitemap.xml file */ fetch(url?: string): Promise; + + /** + * Requests the URL and uses parseStringPromise to parse through and find the data + * + * @param url URL to the sitemap.xml file + */ + parse(url?: string): Promise; } export default Sitemapper;