make-promise
makePromise(obj)
Will make isPromiseLike object into Promise.
var makePromise = require("can-util/js/make-promise/make-promise");
var obj = {};
var promise = makePromise(obj);
console.log(isPromise(promise)); // -> true
console.log(isPromise(obj)); // -> false
Parameters
- obj
{Object}
:An object to be made into Promise.
Returns
{Promise}
:
the object as a Promise.