Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.21 KB

README.md

File metadata and controls

42 lines (32 loc) · 1.21 KB

next-is-promise

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

version license size download

installation

npm install -S @jswork/next-is-promise

usage

import '@jswork/next-is-promise';

const fn1 = () => {
  return new Promise(() => {
    setTimeout(() => {
      resolve('done');
    }, 1000);
  });
};

nx.isPromise(fn1());    // true

license

Code released under the MIT license.