UNPKG
@typed/is-promise
Version:
latest (1.0.0)
1.0.0
Check if a value is a Promise
github.com/tylors/typed-is-promise
tylors/typed-is-promise
@typed/is-promise
/
README.md
18 lines
(12 loc)
•
257 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
@typed
/is-promise
>
Check
if
a value is
PromiseLike
## Let me have it!
``
`sh npm install --save @typed/is-promise `
``
## API
``
`typescript import { isPromise } from '@typed/is-promise'; isPromise(1) // false isPromise(Promise.resolve(1)) // true `
``