Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function normalizeAttributeDefinition(name, prop) {
const { attribute } = prop;
const obj =
typeof attribute === 'object'
? _extends({}, attribute)
: {
source: attribute,
target: attribute,
};
if (obj.source === true) {
obj.source = dashCase(name);
}
if (obj.target === true) {
obj.target = dashCase(name);
}
return obj;
}
export function normalizeAttributeDefinition(name, prop) {
const { attribute } = prop;
const obj =
typeof attribute === 'object'
? _extends({}, attribute)
: {
source: attribute,
target: attribute,
};
if (obj.source === true) {
obj.source = dashCase(name);
}
if (obj.target === true) {
obj.target = dashCase(name);
}
return obj;
}