1. is-promise
Test whether an object looks like a promises-a+ promise
is-promise
Package: is-promise
Created by: then
Last modified: Fri, 09 Jun 2023 21:37:59 GMT
Version: 4.0.0
License: MIT
Downloads: 40,115,578
Repository: https://github.com/then/is-promise

Install

npm install is-promise
yarn add is-promise

is-promise

Test whether an object looks like a promises-a+ promise

Build Status
Dependency Status
NPM version

Installation

$ npm install is-promise

You can also use it client side via npm.

API

 import isPromise from 'is-promise';

isPromise(Promise.resolve());//=>true
isPromise({then:function () {...}});//=>true
isPromise(null);//=>false
isPromise({});//=>false
isPromise({then: true})//=>false

License

MIT

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin