docs: add comments to the src/routes & src/store & src/utils directory

This commit is contained in:
zhaoying
2026-02-02 16:37:32 +08:00
parent 6194222289
commit 9a38e8a4a0
13 changed files with 546 additions and 435 deletions

View File

@@ -1,6 +1,24 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-02 16:35:32
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-02 16:35:32
*/
/**
* YAML Export Utility
*
* Provides functions to export data as YAML files.
*
* @module yamlExport
*/
import yaml from 'js-yaml';
/**
* Export data to YAML file
* @param data - Data to export
* @param filename - Output filename (default: 'export.yaml')
*/
export const exportToYaml = (data: unknown, filename: string = 'export.yaml') => {
const yamlStr = yaml.dump(data);
const blob = new Blob([yamlStr], { type: 'text/yaml' });