diffusion
Version:
Diffusion JavaScript client
20 lines (19 loc) • 701 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateSelectionScope = void 0;
var errors_1 = require("./../../errors/errors");
var require_non_null_1 = require("./require-non-null");
/**
* Validate the a topic selection scope.
*
* @param scope the scope to validate
*
* @throws {@link IllegalArgumentError} if the scope starts with the character $
*/
function validateSelectionScope(scope) {
require_non_null_1.requireNonNull(scope, 'scope');
if (scope.startsWith('$')) {
throw new errors_1.IllegalArgumentError("Scope '" + scope + "' must not start with the character $");
}
}
exports.validateSelectionScope = validateSelectionScope;