Front end of the Slack clone application.

ensure-promise.js 250B

12345678910
  1. "use strict";
  2. var safeToString = require("../safe-to-string")
  3. , isPromise = require("./is-promise");
  4. module.exports = function (value) {
  5. if (!isPromise(value)) throw new TypeError(safeToString(value) + " is not a promise");
  6. return value;
  7. };