var fp = _.noConflict();
var context = {
eventline: { hello: 'you' },
config: 'sadas',
};
var isString = fp.isString;
var isArray = fp.isArray;
var getDefaultProps = fp.flow(
fp.filter(
_.overEvery([
isString,
function (prop) {
return _.hasIn(context, prop);
},
]),
),
fp.reduce(function (acc, i) {
acc[i] = context[i];
return acc;
}, {}),
);
var testNative = function(param) {
param.filter(myVar => (typeof myVar === 'string' || myVar instanceof String) && context[myVar]).reduce(function (acc, i) {
acc[i] = context[i];
return acc;
}, {})
}
var testNativeDash = function(param) {
param.filter(myVar => _.isString(myVar) && _.hasIn(context, myVar)).reduce(function (acc, i) {
acc[i] = context[i];
return acc;
}, {})
}
var isStr = myVar => typeof myVar === 'string' || myVar instanceof String;
var isWithinObj = myVar => !!context[myVar];
var reducer = function (acc, i) {
acc[i] = context[i];
return acc;
}
var testNativeWithFunc = function(param) {
param.filter(myVar => isStr(myVar) && isWithinObj(myVar)).reduce(reducer, {})
}
var test1 = ['eventline']