File: valid-promise.js

package info (click to toggle)
node-tad 3.1.1%2B~cs11.22.49-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,400 kB
  • sloc: javascript: 25,549; makefile: 6
file content (10 lines) | stat: -rw-r--r-- 199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
"use strict";

var isPromise = require("./is-promise");

module.exports = function (value) {
	if (!isPromise(value)) {
		throw new TypeError(value + " is not a promise object");
	}
	return value;
};