Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function nameOfAttr(attr) {
var name = attr.name;
if (attr.output) {
name = utils_1.removeSuffix(name, 'Events');
name = utils_1.removeSuffix(name, 'Changed');
}
var result = [name];
if (attr.input) {
result.unshift('[');
result.push(']');
}
if (attr.output) {
result.unshift('(');
result.push(')');
}
if (attr.template) {
result.unshift('*');
}
return result.join('');
}
function nameOfAttr(attr) {
var name = attr.name;
if (attr.output) {
name = utils_1.removeSuffix(name, 'Events');
name = utils_1.removeSuffix(name, 'Changed');
}
var result = [name];
if (attr.input) {
result.unshift('[');
result.push(']');
}
if (attr.output) {
result.unshift('(');
result.push(')');
}
if (attr.template) {
result.unshift('*');
}
return result.join('');
}
var templateAttr = /^(\w+:)?(template$|^\*)/;