You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
333 B

var each = require('./each');
var isUndef = require('./isUndef');
var isFn = require('./isFn');
exports = function(arr, val) {
if (isUndef(val)) val = true;
var _isFn = isFn(val);
var ret = {};
each(arr, function(key) {
ret[key] = _isFn ? val(key) : val;
});
return ret;
};
module.exports = exports;