JSFiddle - React, Tailwind, and code Playground
by f0t0n
JavaScript
var getProperties = function(obj) {
var propsCopy,
i;
propsCopy = {};
for(i in obj) {
if(typeof(obj[i]) !== 'function') {
propsCopy[i] = obj[i];
}
}
return propsCopy;
};
var obj = {
x: 1,
y: 2,
fn: function(x) {
return x * x;
}
};
console.log(obj);
console.log(getProperties(obj));