1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 07:35:45 +01:00

Better handling of operations on list options with complex types. Closes #37.

This commit is contained in:
Kris Maglione
2015-04-25 12:48:31 -07:00
parent aee0c79752
commit 61df94e750
5 changed files with 16 additions and 6 deletions

View File

@@ -83,6 +83,13 @@ var Promises = Module("Promises", {
});
},
/**
* Returns true if the passed object is a promise.
*/
isPromise: function isPromise(obj) {
return isObject(obj) && typeof obj.then === "function";
},
/**
* Returns a promise which resolves after the given number of
* milliseconds.