@pronto-tools-and-more/custom-js-functions 12.37.0 → 12.39.0

Sign up to get free protection for your applications and to get access to all the features.
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.37.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
  };