Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test input for
1. A type expression containing a namepath, e.g. Array.
2. a namepath referencing an `id`
3. a namepath referencing a `longname`
*/
if ((matches = input.match(/.*?<(.*?)>/))) {
namepath = matches[1]
} else {
namepath = input
}
options.hash = { id: namepath }
linked = dmd._identifier(options)
if (!linked) {
options.hash = { longname: namepath }
linked = dmd._identifier(options)
}
if (!linked) {
output = { name: input, url: null }
} else {
output.name = input.replace(namepath, linked.name)
if (dmd.isExternal.call(linked)) {
if (linked.description) {
output.url = 'external#' + dmd.anchorName.call(linked, options)
} else {
if (linked.see && linked.see.length) {
var firstLink = dmd.arseLink(linked.see[0])[0]
output.url = firstLink ? firstLink.url : linked.see[0]
} else {
output.url = null
}
}
exports.class = (options) => {
options.hash.kind = 'class';
const result = ddata._identifier(options);
if (result && result.kind === 'class') {
result.scope = 'global';
delete result.memberof;
}
return result ? options.fn(result) : 'ERROR, Cannot find class.';
};
var output = {}
/*
test input for
1. A type expression containing a namepath, e.g. Array.
2. a namepath referencing an `id`
3. a namepath referencing a `longname`
*/
if ((matches = input.match(/.*?<(.*?)>/))) {
namepath = matches[1]
} else {
namepath = input
}
options.hash = { id: namepath }
linked = dmd._identifier(options)
if (!linked) {
options.hash = { longname: namepath }
linked = dmd._identifier(options)
}
if (!linked) {
output = { name: input, url: null }
} else {
output.name = input.replace(namepath, linked.name)
if (dmd.isExternal.call(linked)) {
if (linked.description) {
output.url = 'external#' + dmd.anchorName.call(linked, options)
} else {
if (linked.see && linked.see.length) {
var firstLink = dmd.arseLink(linked.see[0])[0]
output.url = firstLink ? firstLink.url : linked.see[0]
} else {