diff --git a/node/functions/compareVersion.html b/node/functions/compareVersion.html index 5e48a9e..88652e4 100644 --- a/node/functions/compareVersion.html +++ b/node/functions/compareVersion.html @@ -5,4 +5,4 @@

Description

比较两个版本的大小

Example

compareVersion('v1.0.0', '2.0.0') // return -1
compareVersion('a2.0.0', 'B1.0.0', /a|b/ig) // return 1
compareVersion('v1.0.0', 'V1.0.0') // return 0
-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/node/functions/copyFolder.html b/node/functions/copyFolder.html index 0a2e937..db16cde 100644 --- a/node/functions/copyFolder.html +++ b/node/functions/copyFolder.html @@ -1,4 +1,4 @@ copyFolder | Compass helpers for node platforms
  • Parameters

    • source: string

      源文件夹路径

    • destination: string

      目标文件夹路径

    Returns Promise<void>

    Description

    异步复制文件夹及其内容到目标文件夹

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/node/functions/copyFolderSync.html b/node/functions/copyFolderSync.html index 86f8732..3b7321a 100644 --- a/node/functions/copyFolderSync.html +++ b/node/functions/copyFolderSync.html @@ -1,4 +1,4 @@ copyFolderSync | Compass helpers for node platforms
  • Parameters

    • source: string

      源文件夹路径

    • destination: string

      目标文件夹路径

    Returns void

    Description

    同步复制文件夹及其内容到目标文件夹

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/node/functions/createFile.html b/node/functions/createFile.html index 58a195e..62f0e9f 100644 --- a/node/functions/createFile.html +++ b/node/functions/createFile.html @@ -4,4 +4,4 @@

Returns Promise<void>

Description

创建文件

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/node/functions/createFileSync.html b/node/functions/createFileSync.html index be336b0..3d6fd15 100644 --- a/node/functions/createFileSync.html +++ b/node/functions/createFileSync.html @@ -4,4 +4,4 @@

Returns void

Description

创建文件

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/node/functions/createFolder.html b/node/functions/createFolder.html index 19e7ab2..6d7a373 100644 --- a/node/functions/createFolder.html +++ b/node/functions/createFolder.html @@ -2,4 +2,4 @@
  • Optional options: {
        cwd?: string;
    }

    配置项

  • Returns Promise<void>

    Description

    创建文件夹

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/encodePhoneNumber.html b/node/functions/encodePhoneNumber.html index f84db1a..a389722 100644 --- a/node/functions/encodePhoneNumber.html +++ b/node/functions/encodePhoneNumber.html @@ -8,4 +8,4 @@

    Default

    *
     
  • Optional offsetLength?: number

    向右偏移长度,影响加密块离左边的距离

  • Returns string

    Description

    加密手机号码,脱敏处理

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/formatDate.html b/node/functions/formatDate.html index b54cddc..ec3f37a 100644 --- a/node/functions/formatDate.html +++ b/node/functions/formatDate.html @@ -5,4 +5,4 @@

    Returns string

    Description

    时间格式化

    Example

    import { formatDate } from '@compass-aiden/utils';

    formatDate(); // 返回当前时间,格式为 'YYYY-MM-DD hh:mm:ss'
    formatDate('2020/03/12'); // 指定可被Date处理的时间字符串,格式为 'YYYY-MM-DD hh:mm:ss'
    formatDate(Date.now(), 'YYYY/MM/DD'); // 指定可被Date处理的时间戳,格式为 'YYYY/MM/DD'
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/getFilePathsInFolder.html b/node/functions/getFilePathsInFolder.html index 6bc87eb..8406168 100644 --- a/node/functions/getFilePathsInFolder.html +++ b/node/functions/getFilePathsInFolder.html @@ -3,4 +3,4 @@

    Returns Promise<string[]>

    文件路径数组

    Description

    获取文件夹内所有文件路径

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/getFilePathsInFolderSync.html b/node/functions/getFilePathsInFolderSync.html index bdf9dfa..caa9b81 100644 --- a/node/functions/getFilePathsInFolderSync.html +++ b/node/functions/getFilePathsInFolderSync.html @@ -3,4 +3,4 @@

    Returns string[]

    文件路径数组

    Description

    同步获取文件夹内所有文件路径

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/isCommandExists.html b/node/functions/isCommandExists.html index 2e2a839..afbce2e 100644 --- a/node/functions/isCommandExists.html +++ b/node/functions/isCommandExists.html @@ -1,2 +1,2 @@ isCommandExists | Compass helpers for node platforms

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/isFileOrFolderExists.html b/node/functions/isFileOrFolderExists.html index 1077928..01720ef 100644 --- a/node/functions/isFileOrFolderExists.html +++ b/node/functions/isFileOrFolderExists.html @@ -1,3 +1,3 @@ isFileOrFolderExists | Compass helpers for node platforms

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/promiseTask.html b/node/functions/promiseTask.html index d6e95c8..cc876db 100644 --- a/node/functions/promiseTask.html +++ b/node/functions/promiseTask.html @@ -1,3 +1,3 @@ promiseTask | Compass helpers for node platforms

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/replaceVariablesInString.html b/node/functions/replaceVariablesInString.html index 690acbe..8eb7c8e 100644 --- a/node/functions/replaceVariablesInString.html +++ b/node/functions/replaceVariablesInString.html @@ -1,4 +1,4 @@ replaceVariablesInString | Compass helpers for node platforms
    • Parameters

      • templateString: string

        字符串模板

      • params: Record<string, string>

        参数对象

      Returns string

      Description

      替换字符串中包裹起来的变量

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/requireModule.html b/node/functions/requireModule.html index 88e5bb3..a30155c 100644 --- a/node/functions/requireModule.html +++ b/node/functions/requireModule.html @@ -1,2 +1,2 @@ requireModule | Compass helpers for node platforms
    • Parameters

      • filePath: string

      Returns any

      Description

      读取模块文件,类似require()函数

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/functions/scanDependencyManager.html b/node/functions/scanDependencyManager.html index 9cf23e7..1a9f451 100644 --- a/node/functions/scanDependencyManager.html +++ b/node/functions/scanDependencyManager.html @@ -1,2 +1,2 @@ scanDependencyManager | Compass helpers for node platforms
    • Parameters

      • Optional opt: {
            cwd?: string;
        }
        • Optional cwd?: string

      Returns "npm" | "pnpm" | "yarn"

      Description

      扫描依赖管理器

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/types/DeepPartial.html b/node/types/DeepPartial.html index 9711781..f9acd7c 100644 --- a/node/types/DeepPartial.html +++ b/node/types/DeepPartial.html @@ -1,2 +1,2 @@ DeepPartial | Compass helpers for node platforms
    DeepPartial<T>: {
        [P in keyof T]?: T[P] extends (infer U)[]
            ? DeepPartial<U>[]
            : T[P] extends ReadonlyArray<infer U>
                ? ReadonlyArray<DeepPartial<U>>
                : T[P] extends object
                    ? DeepPartial<T[P]>
                    : T[P]
    }

    将类型递归变成可选属性

    -

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    Generated using TypeDoc

    \ No newline at end of file diff --git a/node/types/DeepRequired.html b/node/types/DeepRequired.html index 3b5cd19..331d8b1 100644 --- a/node/types/DeepRequired.html +++ b/node/types/DeepRequired.html @@ -1,2 +1,2 @@ DeepRequired | Compass helpers for node platforms
    DeepRequired<T>: {
        [P in keyof T]-?: T[P] extends object
            ? DeepRequired<T[P]>
            : T[P]
    }

    将类型递归变成必填属性

    -

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/classes/Logger.html b/web/classes/Logger.html index 12d297e..406368a 100644 --- a/web/classes/Logger.html +++ b/web/classes/Logger.html @@ -1,7 +1,7 @@ Logger | Compass helpers for web platforms

    Description

    日志记录器

    Example

    import { Logger } from '@compass-aiden/utils';

    // 单例模式使用
    console.log(Logger.config); // 默认配置项
    Logger.config.logLevel = 'debug'; // 修改单个配置
    Logger.updateConfig({
    logLevel: 'debug',
    dateFormat: 'YYYY-MM-DD hh:mm:ss:SSS',
    }); // 批量修改配置
    Logger.debug('Hello world');
    Logger.log('Hello world');
    Logger.info('Hello world');
    Logger.success('Hello world');
    Logger.warn('Hello world');
    Logger.error('Hello world');

    // 多例模式使用
    const loggerMulti = new Logger();
    console.log(loggerMulti.config); // 默认配置项
    loggerMulti.config.logLevel = 'debug'; // 修改单个配置
    loggerMulti.updateConfig({
    subject: 'Aiden2',
    logLevel: 'debug',
    dateFormat: 'YYYY-MM-DD hh:mm:ss',
    }); // 批量修改配置
    loggerMulti.debug('Hello world');
    loggerMulti.log('Hello world');
    loggerMulti.info('Hello world');
    loggerMulti.success('Hello world');
    loggerMulti.warn('Hello world');
    loggerMulti.error('Hello world');
    -

    Constructors

    Constructors

    Properties

    Methods

    debug @@ -18,4 +18,4 @@

    Example

    import<
     success
     updateConfig
     warn
    -

    Constructors

    Properties

    config: LoggerOption = ...
    config: LoggerOption = ...

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Constructors

    Properties

    config: LoggerOption = ...
    config: LoggerOption = ...

    Methods

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/classes/ThemeManager.html b/web/classes/ThemeManager.html index 4bfe836..120df1b 100644 --- a/web/classes/ThemeManager.html +++ b/web/classes/ThemeManager.html @@ -1,7 +1,7 @@ ThemeManager | Compass helpers for web platforms

    Description

    基于 CSS variables 与 DOM 的主题管理器

    Example

    const theme = new ThemeManager({
    baseVariables: { '--scope-font-color': '#212121' }, // 声明基础的公共变量,被所有注册主题继承
    hooks: {
    // 使用hook动态设置主题
    afterSystemThemeChange: (systemTheme) => {
    const currentTheme = theme.getCurrentTheme();
    if (!currentTheme || currentTheme === 'default') {
    theme.unregister('default')
    theme.register('default', ThemeConfig[theme])
    theme.toggle('default')
    }
    }
    }, // 各类hooks监听
    });
    console.log(theme.systemTheme); // 当前的系统主题
    // 主题注册
    theme.register('light', {
    '--scope-page-background-color': '#FFFFFF',
    }).register('dark', {
    '--scope-page-background-color': 'black',
    '--scope-font-color': '#FFFFFF',
    });
    theme.toggle('light'); // 切换light主题
    theme.toggle(); // 切换为空,不应用任何主题
    theme.getCurrentTheme(); // 获取当前使用的主题标识, 例如: 'light'
    theme.getThemeData(); // 返回当前使用主题的数据
    theme.getThemeData('dark'); // 获取指定主题变量,不提供参数,则默认返回当前使用主题的数据
    theme.unregister('purple'); // 移除已注册的主题
    theme.destroy(); // 移除主题管理器,释放内部引用资源
    -

    Constructors

    Constructors

    Properties

    container opt styleElement @@ -15,4 +15,4 @@

    Example

    constregister
     toggle
     unregister
    -

    Constructors

    Properties

    container: Element
    opt: TMConstructor
    styleElement: HTMLStyleElement
    styleSheet: CSSStyleSheet
    systemTheme: "light" | "dark"
    themeMap: Map<string, TMThemeConfig> = ...

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Constructors

    Properties

    container: Element
    opt: TMConstructor
    styleElement: HTMLStyleElement
    styleSheet: CSSStyleSheet
    systemTheme: "light" | "dark"
    themeMap: Map<string, TMThemeConfig> = ...

    Methods

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/functions/compareVersion.html b/web/functions/compareVersion.html index ffb8afd..7ccdfbf 100644 --- a/web/functions/compareVersion.html +++ b/web/functions/compareVersion.html @@ -5,4 +5,4 @@

    Description

    比较两个版本的大小

    Example

    compareVersion('v1.0.0', '2.0.0') // return -1
    compareVersion('a2.0.0', 'B1.0.0', /a|b/ig) // return 1
    compareVersion('v1.0.0', 'V1.0.0') // return 0
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/functions/downloadFile.html b/web/functions/downloadFile.html index d7ab8a6..90e1fe0 100644 --- a/web/functions/downloadFile.html +++ b/web/functions/downloadFile.html @@ -2,4 +2,4 @@
  • filename: string

    指定的文件名

  • Optional blobOption: BlobPropertyBag

    blob处理data时的配置选项

  • Returns void

    Description

    文件下载方法

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/functions/encodePhoneNumber.html b/web/functions/encodePhoneNumber.html index 6e21fca..b9c618f 100644 --- a/web/functions/encodePhoneNumber.html +++ b/web/functions/encodePhoneNumber.html @@ -8,4 +8,4 @@

    Default

    *
     
  • Optional offsetLength?: number

    向右偏移长度,影响加密块离左边的距离

  • Returns string

    Description

    加密手机号码,脱敏处理

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/functions/formatDate.html b/web/functions/formatDate.html index fac1d7c..4660c2b 100644 --- a/web/functions/formatDate.html +++ b/web/functions/formatDate.html @@ -5,4 +5,4 @@

    Returns string

    Description

    时间格式化

    Example

    import { formatDate } from '@compass-aiden/utils';

    formatDate(); // 返回当前时间,格式为 'YYYY-MM-DD hh:mm:ss'
    formatDate('2020/03/12'); // 指定可被Date处理的时间字符串,格式为 'YYYY-MM-DD hh:mm:ss'
    formatDate(Date.now(), 'YYYY/MM/DD'); // 指定可被Date处理的时间戳,格式为 'YYYY/MM/DD'
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/functions/promiseTask.html b/web/functions/promiseTask.html index 3402e10..630fe00 100644 --- a/web/functions/promiseTask.html +++ b/web/functions/promiseTask.html @@ -1,3 +1,3 @@ promiseTask | Compass helpers for web platforms

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/functions/replaceVariablesInString.html b/web/functions/replaceVariablesInString.html index f2a7c07..5b4d0c2 100644 --- a/web/functions/replaceVariablesInString.html +++ b/web/functions/replaceVariablesInString.html @@ -1,4 +1,4 @@ replaceVariablesInString | Compass helpers for web platforms
    • Parameters

      • templateString: string

        字符串模板

      • params: Record<string, string>

        参数对象

      Returns string

      Description

      替换字符串中包裹起来的变量

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/types/DeepPartial.html b/web/types/DeepPartial.html index c05af0e..5b75512 100644 --- a/web/types/DeepPartial.html +++ b/web/types/DeepPartial.html @@ -1,2 +1,2 @@ DeepPartial | Compass helpers for web platforms
    DeepPartial<T>: {
        [P in keyof T]?: T[P] extends (infer U)[]
            ? DeepPartial<U>[]
            : T[P] extends ReadonlyArray<infer U>
                ? ReadonlyArray<DeepPartial<U>>
                : T[P] extends object
                    ? DeepPartial<T[P]>
                    : T[P]
    }

    将类型递归变成可选属性

    -

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file diff --git a/web/types/DeepRequired.html b/web/types/DeepRequired.html index 52b74ab..0253469 100644 --- a/web/types/DeepRequired.html +++ b/web/types/DeepRequired.html @@ -1,2 +1,2 @@ DeepRequired | Compass helpers for web platforms
    DeepRequired<T>: {
        [P in keyof T]-?: T[P] extends object
            ? DeepRequired<T[P]>
            : T[P]
    }

    将类型递归变成必填属性

    -

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file