@varlet/shared 2.8.3 → 2.8.4-alpha.1677149602351

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.
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export declare const isBoolean: (val: unknown) => val is boolean;
3
3
  export declare const isNumber: (val: unknown) => val is number;
4
4
  export declare const isPlainObject: (val: unknown) => val is Record<string, any>;
5
5
  export declare const isObject: (val: unknown) => val is Record<string, any>;
6
+ export declare const isFunction: (val: unknown) => val is Function;
6
7
  export declare const isArray: (val: unknown) => val is any[];
7
8
  export declare const isURL: (val: string | undefined | null) => boolean;
8
9
  export declare const isEmpty: (val: unknown) => boolean;
package/lib/index.js CHANGED
@@ -3,6 +3,8 @@ export const isBoolean = (val) => typeof val === 'boolean';
3
3
  export const isNumber = (val) => typeof val === 'number';
4
4
  export const isPlainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';
5
5
  export const isObject = (val) => typeof val === 'object' && val !== null;
6
+ // eslint-disable-next-line
7
+ export const isFunction = (val) => typeof val === 'function';
6
8
  export const isArray = (val) => Array.isArray(val);
7
9
  export const isURL = (val) => {
8
10
  if (!val) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/shared",
3
- "version": "2.8.3",
3
+ "version": "2.8.4-alpha.1677149602351",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",