How to use the object function from lodash
Find comprehensive JavaScript lodash.object code examples handpicked from public code repositorys.
GitHub: hsz/AdventOfCode2015
2 3 4 5 6 7 8 9 10 11 12 13
; module.exports = function () { var input = fs.readFileSync('input.txt', 'utf8').split('\n').reduce(function (map, v) { v = _.object(['dest', 'b', 'op', 'a'], v.replace(/ /g, '').match(/(?:([a-z]+|\d+)?([A-Z]+))?([a-z]+|\d+)->([a-z]+)/).slice(1).reverse()); return (map[v.dest] = v, map); }, {}) , asmbl = function (map) { while (_.filter(map, _.isObject).length) {
2
5
4
lodash.get is the most popular function in lodash (7670 examples)