Skip to content

Commit

Permalink
feat: 增加 noop 空函数导出
Browse files Browse the repository at this point in the history
  • Loading branch information
Ares-Chang committed Sep 13, 2024
1 parent fe7a593 commit 703405a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ export function getTypeName(v: any): string {
const type = toString(v).slice(8, -1).toLowerCase()
return (typeof v === 'object' || typeof v === 'function') ? type : typeof v
}

/**
* 空函数,什么也不做
*/
export function noop(): void {}

0 comments on commit 703405a

Please sign in to comment.