doipjs/node_modules/@sinonjs/samsam/lib/create-matcher/assert-matcher.js
Yarmo Mackenbach e996bc8023 Initial commit
2020-10-23 22:35:53 +02:00

17 lines
324 B
JavaScript

"use strict";
var isMatcher = require("./is-matcher");
/**
* Throws a TypeError when `value` is not a matcher
*
* @private
* @param {*} value The value to examine
*/
function assertMatcher(value) {
if (!isMatcher(value)) {
throw new TypeError("Matcher expected");
}
}
module.exports = assertMatcher;