@isdk/util 0.1.1 → 0.1.2

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.
Files changed (98) hide show
  1. package/dist/index.d.mts +326 -11
  2. package/dist/index.d.ts +326 -11
  3. package/dist/index.js +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/docs/classes/ConfigFile.md +9 -9
  6. package/docs/functions/getMultiLevelExtname.md +1 -1
  7. package/docs/functions/glob.md +1 -1
  8. package/docs/functions/isStringIn.md +1 -1
  9. package/docs/functions/normalizeIncludeFiles.md +1 -1
  10. package/docs/functions/parseFrontMatter.md +1 -1
  11. package/docs/functions/parseYaml.md +1 -1
  12. package/docs/functions/registerYamlTag.md +1 -1
  13. package/docs/functions/removeLeadingEmptyLines.md +1 -1
  14. package/docs/functions/stringifyYaml.md +1 -1
  15. package/docs/functions/toCamelCase.md +37 -0
  16. package/docs/functions/toPascalCase.md +37 -0
  17. package/docs/functions/traverseFolder.md +1 -1
  18. package/docs/functions/traverseFolderSync.md +1 -1
  19. package/docs/globals.md +4 -0
  20. package/docs/interfaces/IncludeFiles.md +3 -3
  21. package/docs/interfaces/LoadConfigFileOptions.md +25 -0
  22. package/docs/type-aliases/StringifyFunc.md +21 -0
  23. package/docs/type-aliases/TraverseFolderHandler.md +1 -1
  24. package/docs/type-aliases/TraverseFolderSyncHandler.md +1 -1
  25. package/docs/variables/DefaultAllTextFiles.md +1 -1
  26. package/package.json +1 -1
  27. package/dist/chunk-3TCMKKX2.mjs +0 -1
  28. package/dist/chunk-46TT3NZV.mjs +0 -1
  29. package/dist/chunk-7APJBRA7.mjs +0 -1
  30. package/dist/chunk-7AQU3PBW.mjs +0 -1
  31. package/dist/chunk-D3BCI5SM.mjs +0 -1
  32. package/dist/chunk-FXF2KJLF.mjs +0 -1
  33. package/dist/chunk-GGOKSJK4.mjs +0 -1
  34. package/dist/chunk-JTTOXXPG.mjs +0 -1
  35. package/dist/chunk-LOMQZH4U.mjs +0 -292
  36. package/dist/chunk-OTEAFARC.mjs +0 -1
  37. package/dist/chunk-UJZVJIGI.mjs +0 -1
  38. package/dist/config-file.d.mts +0 -75
  39. package/dist/config-file.d.ts +0 -75
  40. package/dist/config-file.js +0 -1
  41. package/dist/config-file.mjs +0 -1
  42. package/dist/config-file.test.d.mts +0 -2
  43. package/dist/config-file.test.d.ts +0 -2
  44. package/dist/config-file.test.js +0 -292
  45. package/dist/config-file.test.mjs +0 -1
  46. package/dist/front-matter.d.mts +0 -6
  47. package/dist/front-matter.d.ts +0 -6
  48. package/dist/front-matter.js +0 -1
  49. package/dist/front-matter.mjs +0 -1
  50. package/dist/front-matter.test.d.mts +0 -2
  51. package/dist/front-matter.test.d.ts +0 -2
  52. package/dist/front-matter.test.js +0 -1
  53. package/dist/front-matter.test.mjs +0 -1
  54. package/dist/get-multi-level-extname.d.mts +0 -9
  55. package/dist/get-multi-level-extname.d.ts +0 -9
  56. package/dist/get-multi-level-extname.js +0 -1
  57. package/dist/get-multi-level-extname.mjs +0 -1
  58. package/dist/glob.d.mts +0 -28
  59. package/dist/glob.d.ts +0 -28
  60. package/dist/glob.js +0 -1
  61. package/dist/glob.mjs +0 -1
  62. package/dist/glob.test.d.mts +0 -2
  63. package/dist/glob.test.d.ts +0 -2
  64. package/dist/glob.test.js +0 -292
  65. package/dist/glob.test.mjs +0 -1
  66. package/dist/include-files.d.mts +0 -31
  67. package/dist/include-files.d.ts +0 -31
  68. package/dist/include-files.js +0 -1
  69. package/dist/include-files.mjs +0 -1
  70. package/dist/include-files.test.d.mts +0 -2
  71. package/dist/include-files.test.d.ts +0 -2
  72. package/dist/include-files.test.js +0 -292
  73. package/dist/include-files.test.mjs +0 -1
  74. package/dist/is-string-in.d.mts +0 -19
  75. package/dist/is-string-in.d.ts +0 -19
  76. package/dist/is-string-in.js +0 -1
  77. package/dist/is-string-in.mjs +0 -1
  78. package/dist/magic-string.es-TUA2PMWY.mjs +0 -1
  79. package/dist/remove-leading-empty-lines.d.mts +0 -18
  80. package/dist/remove-leading-empty-lines.d.ts +0 -18
  81. package/dist/remove-leading-empty-lines.js +0 -1
  82. package/dist/remove-leading-empty-lines.mjs +0 -1
  83. package/dist/remove-leading-empty-lines.test.d.mts +0 -2
  84. package/dist/remove-leading-empty-lines.test.d.ts +0 -2
  85. package/dist/remove-leading-empty-lines.test.js +0 -1
  86. package/dist/remove-leading-empty-lines.test.mjs +0 -1
  87. package/dist/traverse-folder.d.mts +0 -56
  88. package/dist/traverse-folder.d.ts +0 -56
  89. package/dist/traverse-folder.js +0 -1
  90. package/dist/traverse-folder.mjs +0 -1
  91. package/dist/traverse-folder.test.d.mts +0 -2
  92. package/dist/traverse-folder.test.d.ts +0 -2
  93. package/dist/traverse-folder.test.js +0 -292
  94. package/dist/traverse-folder.test.mjs +0 -1
  95. package/dist/yaml.d.mts +0 -59
  96. package/dist/yaml.d.ts +0 -59
  97. package/dist/yaml.js +0 -1
  98. package/dist/yaml.mjs +0 -1
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,f=(e,t,s,f)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of i(t))o.call(e,a)||a===s||r(e,a,{get:()=>t[a],enumerable:!(f=n(t,a))||f.enumerable});return e},a=(e,n,i)=>(i=null!=e?t(s(e)):{},f(!n&&e&&e.__esModule?i:r(i,"default",{value:e,enumerable:!0}),e)),c={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(c,{ConfigFile:()=>F,DefaultAllTextFiles:()=>A,getMultiLevelExtname:()=>y,glob:()=>T,isStringIn:()=>k,normalizeIncludeFiles:()=>L,parseFrontMatter:()=>q,parseYaml:()=>d,registerYamlTag:()=>b,removeLeadingEmptyLines:()=>j,stringifyYaml:()=>h,traverseFolder:()=>M,traverseFolderSync:()=>Y}),module.exports=(e=c,f(r({},"__esModule",{value:!0}),e));var u=require("fs"),l=a(require("path")),m=require("load-config-file"),p=a(require("path"));function y(e,t=1){let r="";for(;t--;){const t=p.default.extname(e);if(!t)break;r=t+r,e=p.default.basename(e,t)}return r}var v=require("yaml"),g=[];function b(e){Array.isArray(e)||(e=[e]);for(const t of e){-1===g.indexOf(t)&&g.push(t)}}function d(e,t){if(t)if(t.customTags){if(Array.isArray(t.customTags))t.customTags=g.concat(t.customTags);else if("function"==typeof t.customTags){const e=t.customTags;t.customTags=t=>e(g.concat(t))}}else t.customTags=g;else t={customTags:g};return(0,v.parse)(e,t)}function h(e,t){if(t)if(t.customTags){if(Array.isArray(t.customTags))t.customTags=g.concat(t.customTags);else if("function"==typeof t.customTags){const e=t.customTags;t.customTags=t=>e(g.concat(t))}}else t.customTags=g;else t={customTags:g};return(0,v.stringify)(e,t)}function j(e){const t=/^\s*(#[^\r\n]*)?[\r\n]+/;let r;for(;null!==(r=t.exec(e))&&((e=e.substring(r[0].length)).startsWith("\n")||e.startsWith("\r")||e.trimStart().startsWith("#")););return e}var x="---";function q(e,t=x){const r=t.length,n=j(e);if(n.startsWith(t)&&("\n"===n[t.length]||"\r"===n[t.length])){let e=n.indexOf("\n"+t,r);if(-1!==e){const i=n.slice(r,e);for(e+=t.length+1;"\n"===n[e]||"\r"===n[e];)e++;const s=n.slice(e);return{data:d(i)||{},content:s}}}return{data:{},content:e}}var F=class{static register(e,t,r){m.Config.register(e,t),"string"==typeof e&&(e=[e]);for(const t of e)this.stringifys[t]=r}static load(e,t){return function(e,{extLevel:t=1,externalFile:r}={}){"."===e[0]&&t++;const n=y(e,t);n&&n.split(".").length>1&&(e=e.slice(0,-n.length));let i=m.Config.loadSync(e);if(!i&&r){if(!l.default.isAbsolute(r)){const t=l.default.dirname(e);r=l.default.join(t,r)}if((0,u.existsSync)(r)){const e=q((0,u.readFileSync)(r,"utf8")).data;Object.keys(e).length&&(i=e)}}return i}(e,t)}static save(e,t,r){return function(e,t,{extLevel:r=1}={}){"."===e[0]&&r++;let n=y(e,r);(!n||n.split(".").length<=1)&&(e+=".yaml",n=".yaml");const i=F.stringifys[n];if(!i)throw new Error(`${e} unsupported mime type: ${n}`);t=i(t);const s=l.default.dirname(e);(0,u.existsSync)(s)||(0,u.mkdirSync)(s,{recursive:!0});return(0,u.writeFileSync)(e,t,{encoding:"utf8"}),e}(e,t,r)}};F.stringifys={},F.register([".yml",".yaml"],d,h),F.register([".json"],(function(e){return JSON.parse(e)}),(e=>JSON.stringify(e,null,2)));var O=require("@isdk/glob"),w=a(require("path"));function T(e,t,r){return r&&(e=w.default.relative(r,e)),(0,O.globMatch)(e,t)}function k(e,t){return"string"==typeof t&&(t=[t]),-1!==t.indexOf(e)}var A=["**/*.((j|t)s?(x)|m(j|t)s)?(x)","**/*.(md|markdown|txt|?(x)htm?(l)|yaml|yml|xml|json|bat|sh|bash|zsh|ini|css|scss|less|sass|py|rb|php|go|java|c|cpp|h|hpp|hxx|rust|zig)"];function L(e,t=A){if(e)if(Array.isArray(e))e=[...e];else{const r=e.include||[],n=e.exclude||[];0===r.length&&r.push(...t),e=[...r];for(const t of n)e.push(`!${t}`)}else e=[...t];return 0===e.length&&e.push(...t),e}var S=require("fs/promises"),z=require("fs"),E=a(require("path"));async function M(e,t){const r=await(0,S.readdir)(e,{withFileTypes:!0,recursive:!0});for(const n of r){const r=E.default.join(e,n.name);if(!0===await t(r,n))break}}function Y(e,t){const r=(0,z.readdirSync)(e,{withFileTypes:!0,recursive:!0});for(const n of r){if(!0===t(E.default.join(e,n.name),n))break}}
1
+ "use strict";var e,t=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,a=(e,t,i,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let f of o(t))s.call(e,f)||f===i||r(e,f,{get:()=>t[f],enumerable:!(a=n(t,f))||a.enumerable});return e},f=(e,n,o)=>(o=null!=e?t(i(e)):{},a(!n&&e&&e.__esModule?o:r(o,"default",{value:e,enumerable:!0}),e)),u={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(u,{ConfigFile:()=>F,DefaultAllTextFiles:()=>A,getMultiLevelExtname:()=>y,glob:()=>T,isStringIn:()=>k,normalizeIncludeFiles:()=>L,parseFrontMatter:()=>q,parseYaml:()=>d,registerYamlTag:()=>b,removeLeadingEmptyLines:()=>j,stringifyYaml:()=>h,toCamelCase:()=>$,toPascalCase:()=>Y,traverseFolder:()=>E,traverseFolderSync:()=>M}),module.exports=(e=u,a(r({},"__esModule",{value:!0}),e));var c=require("fs"),l=f(require("path")),m=require("load-config-file"),p=f(require("path"));function y(e,t=1){let r="";for(;t--;){const t=p.default.extname(e);if(!t)break;r=t+r,e=p.default.basename(e,t)}return r}var v=require("yaml"),g=[];function b(e){Array.isArray(e)||(e=[e]);for(const t of e){-1===g.indexOf(t)&&g.push(t)}}function d(e,t){if(t)if(t.customTags){if(Array.isArray(t.customTags))t.customTags=g.concat(t.customTags);else if("function"==typeof t.customTags){const e=t.customTags;t.customTags=t=>e(g.concat(t))}}else t.customTags=g;else t={customTags:g};return(0,v.parse)(e,t)}function h(e,t){if(t)if(t.customTags){if(Array.isArray(t.customTags))t.customTags=g.concat(t.customTags);else if("function"==typeof t.customTags){const e=t.customTags;t.customTags=t=>e(g.concat(t))}}else t.customTags=g;else t={customTags:g};return(0,v.stringify)(e,t)}function j(e){const t=/^\s*(#[^\r\n]*)?[\r\n]+/;let r;for(;null!==(r=t.exec(e))&&((e=e.substring(r[0].length)).startsWith("\n")||e.startsWith("\r")||e.trimStart().startsWith("#")););return e}var x="---";function q(e,t=x){const r=t.length,n=j(e);if(n.startsWith(t)&&("\n"===n[t.length]||"\r"===n[t.length])){let e=n.indexOf("\n"+t,r);if(-1!==e){const o=n.slice(r,e);for(e+=t.length+1;"\n"===n[e]||"\r"===n[e];)e++;const i=n.slice(e);return{data:d(o)||{},content:i}}}return{data:{},content:e}}var F=class{static register(e,t,r){m.Config.register(e,t),"string"==typeof e&&(e=[e]);for(const t of e)this.stringifys[t]=r}static load(e,t){return function(e,{extLevel:t=1,externalFile:r}={}){"."===e[0]&&t++;const n=y(e,t);n&&n.split(".").length>1&&(e=e.slice(0,-n.length));let o=m.Config.loadSync(e);if(!o&&r){if(!l.default.isAbsolute(r)){const t=l.default.dirname(e);r=l.default.join(t,r)}if((0,c.existsSync)(r)){const e=q((0,c.readFileSync)(r,"utf8")).data;Object.keys(e).length&&(o=e)}}return o}(e,t)}static save(e,t,r){return function(e,t,{extLevel:r=1}={}){"."===e[0]&&r++;let n=y(e,r);(!n||n.split(".").length<=1)&&(e+=".yaml",n=".yaml");const o=F.stringifys[n];if(!o)throw new Error(`${e} unsupported mime type: ${n}`);t=o(t);const i=l.default.dirname(e);(0,c.existsSync)(i)||(0,c.mkdirSync)(i,{recursive:!0});return(0,c.writeFileSync)(e,t,{encoding:"utf8"}),e}(e,t,r)}};F.stringifys={},F.register([".yml",".yaml"],d,h),F.register([".json"],(function(e){return JSON.parse(e)}),(e=>JSON.stringify(e,null,2)));var O=require("@isdk/glob"),w=f(require("path"));function T(e,t,r){return r&&(e=w.default.relative(r,e)),(0,O.globMatch)(e,t)}function k(e,t){return"string"==typeof t&&(t=[t]),-1!==t.indexOf(e)}var A=["**/*.((j|t)s?(x)|m(j|t)s)?(x)","**/*.(md|markdown|txt|?(x)htm?(l)|yaml|yml|xml|json|bat|sh|bash|zsh|ini|css|scss|less|sass|py|rb|php|go|java|c|cpp|h|hpp|hxx|rust|zig)"];function L(e,t=A){if(e)if(Array.isArray(e))e=[...e];else{const r=e.include||[],n=e.exclude||[];0===r.length&&r.push(...t),e=[...r];for(const t of n)e.push(`!${t}`)}else e=[...t];return 0===e.length&&e.push(...t),e}var C=require("fs/promises"),S=require("fs"),z=f(require("path"));async function E(e,t){const r=await(0,C.readdir)(e,{withFileTypes:!0,recursive:!0});for(const n of r){const r=z.default.join(e,n.name);if(!0===await t(r,n))break}}function M(e,t){const r=(0,S.readdirSync)(e,{withFileTypes:!0,recursive:!0});for(const n of r){if(!0===t(z.default.join(e,n.name),n))break}}function Y(e){if(!e)return"";return e.replace(/[-_ ]+/g," ").split(" ").filter(Boolean).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")}function $(e){return(e=Y(e)).charAt(0).toLowerCase()+e.slice(1)}
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{isStringIn as m}from"./chunk-FXF2KJLF.mjs";import{traverseFolder as o,traverseFolderSync as r}from"./chunk-46TT3NZV.mjs";import{ConfigFile as p}from"./chunk-3TCMKKX2.mjs";import{parseFrontMatter as t}from"./chunk-JTTOXXPG.mjs";import{removeLeadingEmptyLines as c}from"./chunk-D3BCI5SM.mjs";import{parseYaml as f,registerYamlTag as h,stringifyYaml as i}from"./chunk-OTEAFARC.mjs";import{getMultiLevelExtname as j}from"./chunk-7AQU3PBW.mjs";import{glob as k}from"./chunk-7APJBRA7.mjs";import{DefaultAllTextFiles as n,normalizeIncludeFiles as s}from"./chunk-GGOKSJK4.mjs";import{init_esm_shims as u}from"./chunk-UJZVJIGI.mjs";u();export{p as ConfigFile,n as DefaultAllTextFiles,j as getMultiLevelExtname,k as glob,m as isStringIn,s as normalizeIncludeFiles,t as parseFrontMatter,f as parseYaml,h as registerYamlTag,c as removeLeadingEmptyLines,i as stringifyYaml,o as traverseFolder,r as traverseFolderSync};
1
+ import{existsSync as t,mkdirSync as r,readFileSync as n,writeFileSync as o}from"fs";import e from"path";import{Config as s}from"load-config-file";import i from"path";function f(t,r=1){let n="";for(;r--;){const r=i.extname(t);if(!r)break;n=r+n,t=i.basename(t,r)}return n}import{parse as c,stringify as u}from"yaml";var a=[];function l(t){Array.isArray(t)||(t=[t]);for(const r of t){-1===a.indexOf(r)&&a.push(r)}}function m(t,r){if(r)if(r.customTags){if(Array.isArray(r.customTags))r.customTags=a.concat(r.customTags);else if("function"==typeof r.customTags){const t=r.customTags;r.customTags=r=>t(a.concat(r))}}else r.customTags=a;else r={customTags:a};return c(t,r)}function p(t,r){if(r)if(r.customTags){if(Array.isArray(r.customTags))r.customTags=a.concat(r.customTags);else if("function"==typeof r.customTags){const t=r.customTags;r.customTags=r=>t(a.concat(r))}}else r.customTags=a;else r={customTags:a};return u(t,r)}function y(t){const r=/^\s*(#[^\r\n]*)?[\r\n]+/;let n;for(;null!==(n=r.exec(t))&&((t=t.substring(n[0].length)).startsWith("\n")||t.startsWith("\r")||t.trimStart().startsWith("#")););return t}function h(t,r="---"){const n=r.length,o=y(t);if(o.startsWith(r)&&("\n"===o[r.length]||"\r"===o[r.length])){let t=o.indexOf("\n"+r,n);if(-1!==t){const e=o.slice(n,t);for(t+=r.length+1;"\n"===o[t]||"\r"===o[t];)t++;const s=o.slice(t);return{data:m(e)||{},content:s}}}return{data:{},content:t}}var g=class{static register(t,r,n){s.register(t,r),"string"==typeof t&&(t=[t]);for(const r of t)this.stringifys[r]=n}static load(r,o){return function(r,{extLevel:o=1,externalFile:i}={}){"."===r[0]&&o++;const c=f(r,o);c&&c.split(".").length>1&&(r=r.slice(0,-c.length));let u=s.loadSync(r);if(!u&&i){if(!e.isAbsolute(i)){const t=e.dirname(r);i=e.join(t,i)}if(t(i)){const t=h(n(i,"utf8")).data;Object.keys(t).length&&(u=t)}}return u}(r,o)}static save(n,s,i){return function(n,s,{extLevel:i=1}={}){"."===n[0]&&i++;let c=f(n,i);(!c||c.split(".").length<=1)&&(n+=".yaml",c=".yaml");const u=g.stringifys[c];if(!u)throw new Error(`${n} unsupported mime type: ${c}`);s=u(s);const a=e.dirname(n);t(a)||r(a,{recursive:!0});return o(n,s,{encoding:"utf8"}),n}(n,s,i)}};g.stringifys={},g.register([".yml",".yaml"],m,p),g.register([".json"],(function(t){return JSON.parse(t)}),(t=>JSON.stringify(t,null,2)));import{globMatch as x}from"@isdk/glob";import v from"path";function d(t,r,n){return n&&(t=v.relative(n,t)),x(t,r)}function b(t,r){return"string"==typeof r&&(r=[r]),-1!==r.indexOf(t)}var w=["**/*.((j|t)s?(x)|m(j|t)s)?(x)","**/*.(md|markdown|txt|?(x)htm?(l)|yaml|yml|xml|json|bat|sh|bash|zsh|ini|css|scss|less|sass|py|rb|php|go|java|c|cpp|h|hpp|hxx|rust|zig)"];function j(t,r=w){if(t)if(Array.isArray(t))t=[...t];else{const n=t.include||[],o=t.exclude||[];0===n.length&&n.push(...r),t=[...n];for(const r of o)t.push(`!${r}`)}else t=[...r];return 0===t.length&&t.push(...r),t}import{readdir as k}from"fs/promises";import{readdirSync as A}from"fs";import T from"path";async function F(t,r){const n=await k(t,{withFileTypes:!0,recursive:!0});for(const o of n){const n=T.join(t,o.name);if(!0===await r(n,o))break}}function O(t,r){const n=A(t,{withFileTypes:!0,recursive:!0});for(const o of n){if(!0===r(T.join(t,o.name),o))break}}function $(t){if(!t)return"";return t.replace(/[-_ ]+/g," ").split(" ").filter(Boolean).map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join("")}function z(t){return(t=$(t)).charAt(0).toLowerCase()+t.slice(1)}export{g as ConfigFile,w as DefaultAllTextFiles,f as getMultiLevelExtname,d as glob,b as isStringIn,j as normalizeIncludeFiles,h as parseFrontMatter,m as parseYaml,l as registerYamlTag,y as removeLeadingEmptyLines,p as stringifyYaml,z as toCamelCase,$ as toPascalCase,F as traverseFolder,O as traverseFolderSync};
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: ConfigFile
8
8
 
9
- Defined in: [config-file.ts:45](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/config-file.ts#L45)
9
+ Defined in: [config-file.ts:46](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L46)
10
10
 
11
11
  Represents a configuration file utility class that provides methods to load and save configuration files.
12
12
  It supports multiple file formats such as YAML, JSON, etc., by registering corresponding parsers and stringifiers.
@@ -43,9 +43,9 @@ console.log(config); // Output: { key: 'value' }
43
43
 
44
44
  ### stringifys
45
45
 
46
- > `static` **stringifys**: `Record`\<`string`, `StringifyFunc`\> = `{}`
46
+ > `static` **stringifys**: `Record`\<`string`, [`StringifyFunc`](../type-aliases/StringifyFunc.md)\> = `{}`
47
47
 
48
- Defined in: [config-file.ts:49](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/config-file.ts#L49)
48
+ Defined in: [config-file.ts:50](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L50)
49
49
 
50
50
  A record of registered stringify functions for different file extensions.
51
51
 
@@ -55,7 +55,7 @@ A record of registered stringify functions for different file extensions.
55
55
 
56
56
  > `static` **load**(`filename`, `options`?): `any`
57
57
 
58
- Defined in: [config-file.ts:84](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/config-file.ts#L84)
58
+ Defined in: [config-file.ts:85](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L85)
59
59
 
60
60
  Loads a configuration file based on the provided filename and options.
61
61
 
@@ -69,7 +69,7 @@ The path to the configuration file.
69
69
 
70
70
  ##### options?
71
71
 
72
- `LoadConfigFileOptions`
72
+ [`LoadConfigFileOptions`](../interfaces/LoadConfigFileOptions.md)
73
73
 
74
74
  Additional options for loading the configuration file.
75
75
 
@@ -92,7 +92,7 @@ console.log(config); // Output: { key: 'value' }
92
92
 
93
93
  > `static` **register**(`extname`, `parser`, `stringify`): `void`
94
94
 
95
- Defined in: [config-file.ts:63](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/config-file.ts#L63)
95
+ Defined in: [config-file.ts:64](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L64)
96
96
 
97
97
  Registers a parser and stringifier for specific file extensions.
98
98
 
@@ -112,7 +112,7 @@ A function that parses the file content into an object.
112
112
 
113
113
  ##### stringify
114
114
 
115
- `StringifyFunc`
115
+ [`StringifyFunc`](../type-aliases/StringifyFunc.md)
116
116
 
117
117
  A function that converts an object back into file content.
118
118
 
@@ -132,7 +132,7 @@ ConfigFile.register(['.json'], JSON.parse, (obj) => JSON.stringify(obj, null, 2)
132
132
 
133
133
  > `static` **save**(`filename`, `config`, `options`?): `string`
134
134
 
135
- Defined in: [config-file.ts:101](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/config-file.ts#L101)
135
+ Defined in: [config-file.ts:102](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L102)
136
136
 
137
137
  Saves a configuration object to a file with the specified filename and options.
138
138
 
@@ -152,7 +152,7 @@ The configuration object to save.
152
152
 
153
153
  ##### options?
154
154
 
155
- `LoadConfigFileOptions`
155
+ [`LoadConfigFileOptions`](../interfaces/LoadConfigFileOptions.md)
156
156
 
157
157
  Additional options for saving the configuration file.
158
158
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **getMultiLevelExtname**(`filename`, `level`): `string`
10
10
 
11
- Defined in: [get-multi-level-extname.ts:9](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/get-multi-level-extname.ts#L9)
11
+ Defined in: [get-multi-level-extname.ts:9](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/get-multi-level-extname.ts#L9)
12
12
 
13
13
  Retrieves multi-level file extension
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **glob**(`filepath`, `pattern`, `rootDir`?): `undefined` \| `boolean`
10
10
 
11
- Defined in: [glob.ts:29](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/glob.ts#L29)
11
+ Defined in: [glob.ts:29](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/glob.ts#L29)
12
12
 
13
13
  Matches a file path against a list of glob patterns.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **isStringIn**(`str`, `arr`): `boolean`
10
10
 
11
- Defined in: [is-string-in.ts:17](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/is-string-in.ts#L17)
11
+ Defined in: [is-string-in.ts:17](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/is-string-in.ts#L17)
12
12
 
13
13
  Checks if a given string exists within an array of strings or a single string.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **normalizeIncludeFiles**(`files`?, `defaultFiles`?): `string`[]
10
10
 
11
- Defined in: [include-files.ts:34](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/include-files.ts#L34)
11
+ Defined in: [include-files.ts:34](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/include-files.ts#L34)
12
12
 
13
13
  Normalizes a list of file patterns for glob matching.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **parseFrontMatter**(`value`, `delimiter`): `object`
10
10
 
11
- Defined in: [front-matter.ts:6](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/front-matter.ts#L6)
11
+ Defined in: [front-matter.ts:6](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/front-matter.ts#L6)
12
12
 
13
13
  ## Parameters
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **parseYaml**(`content`, `options`?): `any`
10
10
 
11
- Defined in: [yaml.ts:51](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/yaml.ts#L51)
11
+ Defined in: [yaml.ts:51](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/yaml.ts#L51)
12
12
 
13
13
  Parses a YAML string into a JavaScript object with optional custom tags.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **registerYamlTag**(`tags`): `void`
10
10
 
11
- Defined in: [yaml.ts:23](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/yaml.ts#L23)
11
+ Defined in: [yaml.ts:23](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/yaml.ts#L23)
12
12
 
13
13
  Registers custom YAML tags to be used in parsing and stringifying YAML content.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **removeLeadingEmptyLines**(`text`): `string`
10
10
 
11
- Defined in: [remove-leading-empty-lines.ts:16](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/remove-leading-empty-lines.ts#L16)
11
+ Defined in: [remove-leading-empty-lines.ts:16](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/remove-leading-empty-lines.ts#L16)
12
12
 
13
13
  Removes all leading empty lines or "#" comments line from the given string.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **stringifyYaml**(`content`, `options`?): `string`
10
10
 
11
- Defined in: [yaml.ts:85](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/yaml.ts#L85)
11
+ Defined in: [yaml.ts:85](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/yaml.ts#L85)
12
12
 
13
13
  Converts a JavaScript object into a YAML string with optional custom tags.
14
14
 
@@ -0,0 +1,37 @@
1
+ [**@isdk/util**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/util](../globals.md) / toCamelCase
6
+
7
+ # Function: toCamelCase()
8
+
9
+ > **toCamelCase**(`str`): `string`
10
+
11
+ Defined in: [to-camel-case.ts:17](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/to-camel-case.ts#L17)
12
+
13
+ Converts a string to camelCase.
14
+
15
+ ## Parameters
16
+
17
+ ### str
18
+
19
+ `string`
20
+
21
+ The string to convert.
22
+
23
+ ## Returns
24
+
25
+ `string`
26
+
27
+ The camelCase version of the string.
28
+
29
+ ## Example
30
+
31
+ ```typescript
32
+ console.log(toCamelCase("some-word")); // Output: "someWord"
33
+ console.log(toCamelCase("some_Word")); // Output: "someWord"
34
+ console.log(toCamelCase("Some Word")); // Output: "someWord"
35
+ console.log(toCamelCase("SomeWord")); // Output: "someWord"
36
+ console.log(toCamelCase("")); // Output: ""
37
+ ```
@@ -0,0 +1,37 @@
1
+ [**@isdk/util**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/util](../globals.md) / toPascalCase
6
+
7
+ # Function: toPascalCase()
8
+
9
+ > **toPascalCase**(`str`): `string`
10
+
11
+ Defined in: [to-pascal-case.ts:16](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/to-pascal-case.ts#L16)
12
+
13
+ Converts a string to PascalCase.
14
+
15
+ ## Parameters
16
+
17
+ ### str
18
+
19
+ `string`
20
+
21
+ The string to convert.
22
+
23
+ ## Returns
24
+
25
+ `string`
26
+
27
+ The PascalCase version of the string.
28
+
29
+ ## Example
30
+
31
+ ```typescript
32
+ console.log(toPascalCase("some-word")); // Output: "SomeWord"
33
+ console.log(toPascalCase("some_Word")); // Output: "SomeWord"
34
+ console.log(toPascalCase("someWord")); // Output: "SomeWord"
35
+ console.log(toPascalCase("some word")); // Output: "SomeWord"
36
+ console.log(toPascalCase("SOME_WORD")); // Output: "SomeWord"
37
+ ```
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **traverseFolder**(`directoryPath`, `fileHandler`): `Promise`\<`void`\>
10
10
 
11
- Defined in: [traverse-folder.ts:38](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/traverse-folder.ts#L38)
11
+ Defined in: [traverse-folder.ts:38](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/traverse-folder.ts#L38)
12
12
 
13
13
  Traverses a folder asynchronously and applies a handler to each file or directory.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **traverseFolderSync**(`directoryPath`, `fileHandler`): `void`
10
10
 
11
- Defined in: [traverse-folder.ts:66](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/traverse-folder.ts#L66)
11
+ Defined in: [traverse-folder.ts:66](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/traverse-folder.ts#L66)
12
12
 
13
13
  Traverses a folder synchronously and applies a handler to each file or directory.
14
14
 
package/docs/globals.md CHANGED
@@ -11,9 +11,11 @@
11
11
  ## Interfaces
12
12
 
13
13
  - [IncludeFiles](interfaces/IncludeFiles.md)
14
+ - [LoadConfigFileOptions](interfaces/LoadConfigFileOptions.md)
14
15
 
15
16
  ## Type Aliases
16
17
 
18
+ - [StringifyFunc](type-aliases/StringifyFunc.md)
17
19
  - [TraverseFolderHandler](type-aliases/TraverseFolderHandler.md)
18
20
  - [TraverseFolderSyncHandler](type-aliases/TraverseFolderSyncHandler.md)
19
21
 
@@ -32,5 +34,7 @@
32
34
  - [registerYamlTag](functions/registerYamlTag.md)
33
35
  - [removeLeadingEmptyLines](functions/removeLeadingEmptyLines.md)
34
36
  - [stringifyYaml](functions/stringifyYaml.md)
37
+ - [toCamelCase](functions/toCamelCase.md)
38
+ - [toPascalCase](functions/toPascalCase.md)
35
39
  - [traverseFolder](functions/traverseFolder.md)
36
40
  - [traverseFolderSync](functions/traverseFolderSync.md)
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: IncludeFiles
8
8
 
9
- Defined in: [include-files.ts:6](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/include-files.ts#L6)
9
+ Defined in: [include-files.ts:6](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/include-files.ts#L6)
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: [include-files.ts:6](https://github.com/isdk/util.js/blob/9d50730dc1
14
14
 
15
15
  > `optional` **exclude**: `string`[]
16
16
 
17
- Defined in: [include-files.ts:8](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/include-files.ts#L8)
17
+ Defined in: [include-files.ts:8](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/include-files.ts#L8)
18
18
 
19
19
  ***
20
20
 
@@ -22,4 +22,4 @@ Defined in: [include-files.ts:8](https://github.com/isdk/util.js/blob/9d50730dc1
22
22
 
23
23
  > `optional` **include**: `string`[]
24
24
 
25
- Defined in: [include-files.ts:7](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/include-files.ts#L7)
25
+ Defined in: [include-files.ts:7](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/include-files.ts#L7)
@@ -0,0 +1,25 @@
1
+ [**@isdk/util**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/util](../globals.md) / LoadConfigFileOptions
6
+
7
+ # Interface: LoadConfigFileOptions
8
+
9
+ Defined in: [config-file.ts:20](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L20)
10
+
11
+ ## Properties
12
+
13
+ ### externalFile?
14
+
15
+ > `optional` **externalFile**: `string`
16
+
17
+ Defined in: [config-file.ts:22](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L22)
18
+
19
+ ***
20
+
21
+ ### extLevel?
22
+
23
+ > `optional` **extLevel**: `number`
24
+
25
+ Defined in: [config-file.ts:21](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L21)
@@ -0,0 +1,21 @@
1
+ [**@isdk/util**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/util](../globals.md) / StringifyFunc
6
+
7
+ # Type Alias: StringifyFunc()
8
+
9
+ > **StringifyFunc** = (`content`) => `string`
10
+
11
+ Defined in: [config-file.ts:18](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/config-file.ts#L18)
12
+
13
+ ## Parameters
14
+
15
+ ### content
16
+
17
+ `any`
18
+
19
+ ## Returns
20
+
21
+ `string`
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **TraverseFolderHandler** = (`filePath`, `entry`) => `boolean` \| `void` \| `Promise`\<`boolean` \| `void`\>
10
10
 
11
- Defined in: [traverse-folder.ts:11](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/traverse-folder.ts#L11)
11
+ Defined in: [traverse-folder.ts:11](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/traverse-folder.ts#L11)
12
12
 
13
13
  A handler function for asynchronous folder traversal.
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **TraverseFolderSyncHandler** = (`filePath`, `entry`) => `boolean` \| `void`
10
10
 
11
- Defined in: [traverse-folder.ts:18](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/traverse-folder.ts#L18)
11
+ Defined in: [traverse-folder.ts:18](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/traverse-folder.ts#L18)
12
12
 
13
13
  A handler function for synchronous folder traversal.
14
14
 
@@ -8,4 +8,4 @@
8
8
 
9
9
  > `const` **DefaultAllTextFiles**: `string`[]
10
10
 
11
- Defined in: [include-files.ts:1](https://github.com/isdk/util.js/blob/9d50730dc10248681409cd2901eedc5302b8836b/src/include-files.ts#L1)
11
+ Defined in: [include-files.ts:1](https://github.com/isdk/util.js/blob/79fcdde5490ce675c34a8f772113e8a202beea65/src/include-files.ts#L1)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@isdk/util",
3
3
  "description": "a set of utility functions",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "author": "Riceball LEE @snowyu",
6
6
  "bugs": "https://github.com/isdk/util.js/issues",
7
7
  "dependencies": {
@@ -1 +0,0 @@
1
- import{parseFrontMatter as t}from"./chunk-JTTOXXPG.mjs";import{parseYaml as r,stringifyYaml as o}from"./chunk-OTEAFARC.mjs";import{getMultiLevelExtname as n}from"./chunk-7AQU3PBW.mjs";import{init_esm_shims as e}from"./chunk-UJZVJIGI.mjs";e();import{existsSync as i,mkdirSync as m,readFileSync as s,writeFileSync as f}from"fs";import c from"path";import{Config as u}from"load-config-file";var l=class{static register(t,r,o){u.register(t,r),"string"==typeof t&&(t=[t]);for(const r of t)this.stringifys[r]=o}static load(r,o){return function(r,{extLevel:o=1,externalFile:e}={}){"."===r[0]&&o++;const m=n(r,o);m&&m.split(".").length>1&&(r=r.slice(0,-m.length));let f=u.loadSync(r);if(!f&&e){if(!c.isAbsolute(e)){const t=c.dirname(r);e=c.join(t,e)}if(i(e)){const r=t(s(e,"utf8")).data;Object.keys(r).length&&(f=r)}}return f}(r,o)}static save(t,r,o){return function(t,r,{extLevel:o=1}={}){"."===t[0]&&o++;let e=n(t,o);(!e||e.split(".").length<=1)&&(t+=".yaml",e=".yaml");const s=l.stringifys[e];if(!s)throw new Error(`${t} unsupported mime type: ${e}`);r=s(r);const u=c.dirname(t);i(u)||m(u,{recursive:!0});return f(t,r,{encoding:"utf8"}),t}(t,r,o)}};l.stringifys={},l.register([".yml",".yaml"],r,o),l.register([".json"],(function(t){return JSON.parse(t)}),(t=>JSON.stringify(t,null,2)));export{l as ConfigFile};
@@ -1 +0,0 @@
1
- import{init_esm_shims as o}from"./chunk-UJZVJIGI.mjs";o();import{readdir as r}from"fs/promises";import{readdirSync as i}from"fs";import t from"path";async function s(o,i){const s=await r(o,{withFileTypes:!0,recursive:!0});for(const r of s){const s=t.join(o,r.name);if(!0===await i(s,r))break}}function f(o,r){const s=i(o,{withFileTypes:!0,recursive:!0});for(const i of s){if(!0===r(t.join(o,i.name),i))break}}export{s as traverseFolder,f as traverseFolderSync};
@@ -1 +0,0 @@
1
- import{init_esm_shims as o}from"./chunk-UJZVJIGI.mjs";o();import{globMatch as r}from"@isdk/glob";import m from"path";function t(o,t,i){return i&&(o=m.relative(i,o)),r(o,t)}export{t as glob};
@@ -1 +0,0 @@
1
- import{init_esm_shims as r}from"./chunk-UJZVJIGI.mjs";r();import o from"path";function t(r,t=1){let f="";for(;t--;){const t=o.extname(r);if(!t)break;f=t+f,r=o.basename(r,t)}return f}export{t as getMultiLevelExtname};
@@ -1 +0,0 @@
1
- import{init_esm_shims as n}from"./chunk-UJZVJIGI.mjs";function r(n){const r=/^\s*(#[^\r\n]*)?[\r\n]+/;let o;for(;null!==(o=r.exec(n))&&((n=n.substring(o[0].length)).startsWith("\n")||n.startsWith("\r")||n.trimStart().startsWith("#")););return n}n();export{r as removeLeadingEmptyLines};
@@ -1 +0,0 @@
1
- import{init_esm_shims as r}from"./chunk-UJZVJIGI.mjs";function t(r,t){return"string"==typeof t&&(t=[t]),-1!==t.indexOf(r)}r();export{t as isStringIn};
@@ -1 +0,0 @@
1
- import{init_esm_shims as s}from"./chunk-UJZVJIGI.mjs";s();var t=["**/*.((j|t)s?(x)|m(j|t)s)?(x)","**/*.(md|markdown|txt|?(x)htm?(l)|yaml|yml|xml|json|bat|sh|bash|zsh|ini|css|scss|less|sass|py|rb|php|go|java|c|cpp|h|hpp|hxx|rust|zig)"];function r(s,r=t){if(s)if(Array.isArray(s))s=[...s];else{const t=s.include||[],o=s.exclude||[];0===t.length&&t.push(...r),s=[...t];for(const t of o)s.push(`!${t}`)}else s=[...r];return 0===s.length&&s.push(...r),s}export{t as DefaultAllTextFiles,r as normalizeIncludeFiles};
@@ -1 +0,0 @@
1
- import{removeLeadingEmptyLines as n}from"./chunk-D3BCI5SM.mjs";import{parseYaml as t}from"./chunk-OTEAFARC.mjs";import{init_esm_shims as o}from"./chunk-UJZVJIGI.mjs";o();function r(o,r="---"){const c=r.length,m=n(o);if(m.startsWith(r)&&("\n"===m[r.length]||"\r"===m[r.length])){let n=m.indexOf("\n"+r,c);if(-1!==n){const o=m.slice(c,n);for(n+=r.length+1;"\n"===m[n]||"\r"===m[n];)n++;const f=m.slice(n);return{data:t(o)||{},content:f}}}return{data:{},content:o}}export{r as parseFrontMatter};