Skip to content

Commit

Permalink
feat(typed): isMap Function
Browse files Browse the repository at this point in the history
  • Loading branch information
nomocat authored Aug 27, 2024
1 parent 069b26c commit 3418e3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/typed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export const isDate = (value: any): value is Date => {
return Object.prototype.toString.call(value) === '[object Date]'
}

export const isMap = (value: any): value is Map => {

Check failure on line 55 in src/typed.ts

View workflow job for this annotation

GitHub Actions / verify-cdn-build-matches-src

Generic type 'Map<K, V>' requires 2 type argument(s).
return Object.prototype.toString.call(value) === '[object Map]'
}

/**
* This is really a _best guess_ promise checking. You
* should probably use Promise.resolve(value) to be 100%
Expand Down

0 comments on commit 3418e3e

Please sign in to comment.