Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
VelocityAnimator.prototype.registerEffect = function registerEffect(name, props) {
if (name[0] === ':') {
if (typeof props === 'string') {
this.effects[name] = props;
} else {
throw new Error('second parameter must be a string when registering aliases');
}
} else {
velocity.RegisterEffect(name, props);
}
return this;
};
registerEffect(name, props) {
if (name[0] === ':') {
if (typeof props === 'string') {
this.effects[name] = props;
} else {
throw new Error('second parameter must be a string when registering aliases');
}
} else {
velocity.RegisterEffect(name, props);
}
return this;
}
registerEffect(name:string, props: Object): VelocityAnimator {
if (name[0] === ':') {
if (typeof props === 'string') {
this.effects[name] = props;
} else {
throw new Error('second parameter must be a string when registering aliases');
}
} else {
velocity.RegisterEffect(name, props); //eslint-disable-line
}
return this;
}
registerEffect(name:string, props: Object): VelocityAnimator {
if (name[0] === ':') {
if (typeof props === 'string') {
this.effects[name] = props;
} else {
throw new Error('second parameter must be a string when registering aliases');
}
} else {
velocity.RegisterEffect(name, props); //eslint-disable-line
}
return this;
}