@zwa73/utils 1.0.269 → 1.0.270

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.
@@ -19,9 +19,9 @@ export declare class Markdown {
19
19
  /**从文件构建Md */
20
20
  static fromFile(filepath: string): Promise<Markdown>;
21
21
  /**从数据构建 */
22
- static from(arg: FromArg): Promise<Markdown>;
22
+ static from(arg: FromArg): Markdown;
23
23
  /**输出md文本 */
24
- stringify(opt: Exclude<Parameters<typeof stringify>[2], string | number>): Promise<string>;
24
+ stringify(opt: Exclude<Parameters<typeof stringify>[2], string | number>): string;
25
25
  /**根据标题提取块
26
26
  * @param opt - 选项
27
27
  */
@@ -33,11 +33,11 @@ class Markdown {
33
33
  return Markdown.parse(context);
34
34
  }
35
35
  /**从数据构建 */
36
- static async from(arg) {
36
+ static from(arg) {
37
37
  return new Markdown(arg.data, arg.content);
38
38
  }
39
39
  /**输出md文本 */
40
- async stringify(opt) {
40
+ stringify(opt) {
41
41
  const yamlText = Object.values(this.data ?? {}).length > 0 ? `---\n${(0, yaml_1.stringify)(this.data, opt)}---\n` : '';
42
42
  return `${yamlText}${this.content}`;
43
43
  //return (await getMatter()).stringify(this.content,this.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/utils",
3
- "version": "1.0.269",
3
+ "version": "1.0.270",
4
4
  "description": "my utils",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {