Skip to content

Commit

Permalink
feat(utils): 新增isObject
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Aug 4, 2023
1 parent 5887977 commit 46f6aea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export const getUrlParam = (param: string, url?: string) => {
return '';
};

export const isObject = (obj: any) => Object.prototype.toString.call(obj) === '[object Object]';

export const isPop = (node: MComponent | null): boolean => Boolean(node?.type?.toLowerCase().endsWith('pop'));

export const isPage = (node?: MComponent | null): boolean => {
Expand Down

0 comments on commit 46f6aea

Please sign in to comment.