regexpvalidator
Version:
Validation for String, numbers and objects in javascript
14 lines (13 loc) • 500 B
JavaScript
;
export default function () { //dont move it to array functions, you dont get argument object
let combined = Array.prototype.slice.call(arguments);
let combinedObj = {};
combined.forEach((classType)=> {
Object.keys(classType).forEach((methodName)=> {
if (classType.hasOwnProperty(methodName)) {
combinedObj[methodName] = classType[methodName]
}
})
});
return combinedObj;
};