UNPKG

yadop

Version:
122 lines 4.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tags; (function (tags) { var annotations; (function (annotations) { /** * Indicates if the tag is contains a @description tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function description(tag) { return _onlyAtTags(tag, ['description', 'desc']); } annotations.description = description; /** * Indicates if the tag is contains a @deprecated tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function deprecated(tag) { return _onlyAtTags(tag, ['deprecated']); } annotations.deprecated = deprecated; /** * Indicates if the tag is contains a @methodOf tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function methodOfTag(tag) { return _onlyAtTags(tag, ['methodOf']); } annotations.methodOfTag = methodOfTag; /** * Indicates if the tag is contains a @module tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function module(tag) { return _onlyAtTags(tag, ['module']); } annotations.module = module; /** * Indicates if the tag is contains a @name tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function name(tag) { return _onlyAtTags(tag, ['name']); } annotations.name = name; /** * Indicates if the tag is contains a @ngdoc tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function ngdoc(tag) { return _onlyAtTags(tag, ['ngdoc', 'yadop']); } annotations.ngdoc = ngdoc; /** * Indicates if the tag is contains a @param tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function param(tag) { return _onlyAtTags(tag, ['param', 'arg', 'argument']); } annotations.param = param; /** * Indicates if the tag is contains a @requires tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function requires(tag) { return _onlyAtTags(tag, ['requires']); } annotations.requires = requires; /** * Indicates if the tag is contains a @return tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function returns(tag) { return _onlyAtTags(tag, ['returns', 'return']); } annotations.returns = returns; /** * Indicates if the tag is contains a @name tag. * @param tag The tag. * @param tagNames List of tag name aliases * @return {boolean} indicator The indicator. * @private */ function _onlyAtTags(tag, tagNames) { return tagNames.some(function (tagName) { return tag.title === tagName; }); } annotations._onlyAtTags = _onlyAtTags; })(annotations = tags.annotations || (tags.annotations = {})); var values; (function (values) { /** * Indicates if the tag is contains a @method tag. * @param tag The tag. * @return {boolean} indicator The indicator. */ function method(tag) { return ['function', 'func', 'method'].some(function (tagName) { return tag.description === tagName; }); } values.method = method; /** * Indicates if the has description module. -> @ngdoc module * @param tag The tag. * @return {boolean} indicator The indicator. */ function module(tag) { return tag.description === 'module'; } values.module = module; })(values = tags.values || (tags.values = {})); })(tags = exports.tags || (exports.tags = {})); //# sourceMappingURL=tags.js.map