@minto-ai/tools 1.0.65 → 1.0.66

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.
@@ -5,9 +5,10 @@ import { default as checkEmpty } from './check-empty';
5
5
  import { default as checkEmptyNotZero } from './check-empty-not-zero';
6
6
  import { default as checkObjectEmpty } from './check-object-empty';
7
7
  import { default as isArray } from './is-array';
8
+ import { default as isBoolean } from './is-boolean';
8
9
  import { default as isNullOrUndefined } from './is-null-or-undefined';
9
10
  import { default as isNumber } from './is-number';
10
11
  import { default as isObject } from './is-object';
11
12
  import { default as isString } from './is-string';
12
13
  import { default as isUndefined } from './is-undefined';
13
- export { beParsedAsNumber, canBeParsedAsNumber, checkArrayEmpty, checkEmpty, checkEmptyNotZero, checkObjectEmpty, isArray, isNullOrUndefined, isNumber, isObject, isString, isUndefined, };
14
+ export { beParsedAsNumber, canBeParsedAsNumber, checkArrayEmpty, checkEmpty, checkEmptyNotZero, checkObjectEmpty, isArray, isBoolean, isNullOrUndefined, isNumber, isObject, isString, isUndefined, };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 判断输入值是否是一个布尔值。
3
+ *
4
+ * @param value 输入值。
5
+ * @returns 如果输入值是一个布尔值,则返回 true,否则返回 false。
6
+ */
7
+ declare function isBoolean(value: unknown): value is boolean;
8
+ export default isBoolean;
@@ -29,3 +29,4 @@ export declare class I18n {
29
29
  t(key: string, fallback?: string): string;
30
30
  }
31
31
  export declare const i18n: I18n;
32
+ export type Locale = 'zh-cn' | 'zh-tw' | 'en' | 'ms' | 'ar' | 'th' | 'vi';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Locale } from './i18n';
1
2
  export * from './array';
2
3
  export * from './browser';
3
4
  export * from './core';
@@ -16,11 +17,11 @@ declare const _default: {
16
17
  * 设置语言
17
18
  * @param locale - 语言代码,支持 'zh-cn', 'zh-tw', 'en', 'ms', 'ar', 'th'、'vi'
18
19
  */
19
- locale(locale: string): void;
20
+ locale(locale: Locale): void;
20
21
  /**
21
22
  * 获取当前语言
22
23
  * @returns 当前语言代码
23
24
  */
24
- getLocale(): string;
25
+ getLocale(): Locale;
25
26
  };
26
27
  export default _default;
package/dist/index.js CHANGED
@@ -13804,6 +13804,9 @@ function checkEmpty(value) {
13804
13804
  function checkEmptyNotZero(value) {
13805
13805
  return checkEmpty(value) && value !== 0;
13806
13806
  }
13807
+ function isBoolean(value) {
13808
+ return typeof value === "boolean";
13809
+ }
13807
13810
  function isNullOrUndefined2(value) {
13808
13811
  return value === null || value === void 0;
13809
13812
  }
@@ -16698,6 +16701,7 @@ export {
16698
16701
  getUuid,
16699
16702
  isAndroid,
16700
16703
  isArray$1 as isArray,
16704
+ isBoolean,
16701
16705
  isCompressFilePath,
16702
16706
  isDocumentFilePath,
16703
16707
  isFilePath,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@minto-ai/tools",
3
3
  "type": "module",
4
- "version": "1.0.65",
4
+ "version": "1.0.66",
5
5
  "description": "明途公共工具库",
6
6
  "author": "hcc",
7
7
  "license": "ISC",