Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(otherProps).forEach(key => {
if (
Object.prototype.hasOwnProperty.call(SimpleBarJS.defaultOptions, key)
) {
options[key] = otherProps[key];
} else if (key.match(/data-simplebar-(.+)/)) {
deprecatedOptions.push({
name: key,
value: otherProps[key]
});
} else {
rest[key] = otherProps[key];
}
});