Skip to content

Commit

Permalink
feat: new function - isBlob & isFile
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatAuk committed Dec 26, 2023
1 parent 51a6a38 commit 5447407
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/share/src/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const isRegExp = (val: unknown): val is RegExp => toTypeString(val) === '
export const isMap = (val: unknown): val is Map<any, any> => toTypeString(val) === 'Map'
export const isSet = (val: unknown): val is Set<any> => toTypeString(val) === 'Set'
export const isDate = (val: unknown): val is Date => toTypeString(val) === 'Date]'
export const isFile = (val: unknown): val is File => toTypeString(val) === 'File'
export const isBlob = (val: unknown): val is Blob => toTypeString(val) === 'Blob'

/**
* Check if the value is a plain object, that is, the object created by the Object constructor
*/
Expand Down

0 comments on commit 5447407

Please sign in to comment.