@pronto-tools-and-more/custom-js-functions 12.38.0 → 12.39.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/dist/main.js CHANGED
@@ -488,6 +488,9 @@
488
488
  var getReadTime = (content) => {
489
489
  const parsedSeo = JSON.parse(content?.properties?.purple_seo_meta);
490
490
  const readTime = parsedSeo?.twitter_misc?.["Est. reading time"] || "n/a";
491
+ if (typeof readTime === "number") {
492
+ return `${readTime} min`;
493
+ }
491
494
  return readTime;
492
495
  };
493
496
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/custom-js-functions",
3
- "version": "12.38.0",
3
+ "version": "12.39.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "type": "module",
@@ -1,5 +1,8 @@
1
1
  export const getReadTime = (content: any) => {
2
2
  const parsedSeo = JSON.parse(content?.properties?.purple_seo_meta);
3
3
  const readTime = parsedSeo?.twitter_misc?.["Est. reading time"] || "n/a";
4
+ if (typeof readTime === "number") {
5
+ return `${readTime} min`;
6
+ }
4
7
  return readTime;
5
8
  };