Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typed): isMap Function #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
Loading