is-promise
Advanced tools
Comparing version 2.1.0 to 2.2.0
module.exports = isPromise; | ||
module.exports.default = isPromise; | ||
@@ -3,0 +4,0 @@ function isPromise(obj) { |
{ | ||
"name": "is-promise", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Test whether an object looks like a promises-a+ promise", | ||
"main": "index.js", | ||
"type": "module", | ||
"exports": { | ||
"import": "index.mjs", | ||
"require": "index.js" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"repository": { | ||
@@ -16,5 +24,5 @@ "type": "git", | ||
"devDependencies": { | ||
"better-assert": "~0.1.0", | ||
"mocha": "~1.7.4" | ||
"better-assert": "^1.0.2", | ||
"mocha": "^7.1.1" | ||
} | ||
} | ||
} |
@@ -1,2 +0,3 @@ | ||
<a href="http://promises-aplus.github.com/promises-spec"><img src="http://promises-aplus.github.com/promises-spec/assets/logo-small.png" align="right" /></a> | ||
<a href="https://promisesaplus.com/"><img src="https://promisesaplus.com/assets/logo-small.png" align="right" /></a> | ||
# is-promise | ||
@@ -7,5 +8,7 @@ | ||
[![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) | ||
[![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise) | ||
[![Dependency Status](https://img.shields.io/david/then/is-promise.svg)](https://david-dm.org/then/is-promise) | ||
[![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) | ||
## Installation | ||
@@ -19,5 +22,6 @@ | ||
```javascript | ||
var isPromise = require('is-promise'); | ||
```typescript | ||
import isPromise from 'is-promise'; | ||
isPromise(Promise.resolve());//=>true | ||
isPromise({then:function () {...}});//=>true | ||
@@ -24,0 +28,0 @@ isPromise(null);//=>false |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2668
5
34
Yes
4