Initial commit: Crypto trader application

This commit is contained in:
2025-12-25 20:20:40 -05:00
commit 07a04c1bb8
47895 changed files with 2042266 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/**
* Removes event handlers from the given object.
* A field is considered an event handler if it is a function with a name beginning with `on`.
*
* @param object Object to remove event handlers from.
* @returns Object with event handlers removed.
*/
function omitEventHandlers(object) {
if (object === undefined) {
return {};
}
var result = {};
Object.keys(object).filter(function (prop) {
return !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function');
}).forEach(function (prop) {
result[prop] = object[prop];
});
return result;
}
export default omitEventHandlers;