How to use the object function from underscore

Find comprehensive JavaScript underscore.object code examples handpicked from public code repositorys.

49
50
51
52
53
54
55
56
57
58
59
60
	return src
}


var makeCtx = function(options, urls) {
	// Transform codepoints to hex strings
	var codepoints = _.object(_.map(options.codepoints, function(codepoint, name) {
		return [name, codepoint.toString(16)]
	}))


	return _.extend({
fork icon0
star icon1
watch icon1

204
205
206
207
208
209
210
211
212
213
	if (pageModsExist) {
		const savedPageMods = readPageMods();// require(path.join(profileRoot, "myPageMods.js"));
		Object.assign(glPageMods, savedPageMods);
	} else {
		// init pageMods with no-op f
		Object.assign(glPageMods, _.object(glJobProgress.map(x => [x.url, () => {}])));
		await savePageMods(glPageMods);
	}
}

fork icon0
star icon0
watch icon0

32
33
34
35
36
37
38
39
40
41
42
43
                return null;
            }
            if (colval !== undefined) cols.push([this.__columns[i].name, colval])
        }


        return __.object(cols)
    }
}


module.exports = () => new CsvToJson()
fork icon0
star icon0
watch icon2