p-is-promise
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -1,13 +0,23 @@ | ||
/** | ||
* Check if `input` is a ES2015 promise. | ||
* | ||
* @param input - Value to be checked. | ||
* | ||
* @example | ||
* | ||
* import isPromise from 'p-is-promise'; | ||
* | ||
* isPromise(Promise.resolve('🦄')); | ||
* //=> true | ||
*/ | ||
export default function(input: unknown): input is Promise<unknown>; | ||
declare const pIsPromise: { | ||
/** | ||
Check if `input` is a ES2015 promise. | ||
@param input - Value to be checked. | ||
@example | ||
``` | ||
import isPromise = require('p-is-promise'); | ||
isPromise(Promise.resolve('🦄')); | ||
//=> true | ||
``` | ||
*/ | ||
(input: unknown): input is Promise<unknown>; | ||
// TODO: Remove this for the next major release, refactor the whole definition to: | ||
// declare function pIsPromise(input: unknown): input is Promise<unknown>; | ||
// export = pIsPromise; | ||
default: typeof pIsPromise; | ||
}; | ||
export = pIsPromise; |
@@ -14,2 +14,3 @@ 'use strict'; | ||
module.exports = isPromise; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = isPromise; |
{ | ||
"name": "p-is-promise", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Check if something is a promise", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -38,7 +38,7 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^0.25.0", | ||
"bluebird": "^3.4.6", | ||
"tsd-check": "^0.2.1", | ||
"xo": "^0.23.0" | ||
"ava": "^1.4.1", | ||
"bluebird": "^3.5.4", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
3572
31