I hereby claim:
- I am ruffseason on github.
- I am aossowski (https://keybase.io/aossowski) on keybase.
- I have a public key ASCopMMs5jJGn-lP9knogG6iow0gd83UTQYC6TedOrFA4Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var _n = require('underscore'); | |
var async = require('async'); | |
//sum all the keys in array of objects | |
function objectKeySum(object, properties) { | |
var response = {}; | |
async.forEachOf( | |
properties, | |
function(value, key, callback) { | |
var summed = _n.reduce(_n.pluck(object,value), function (t,h) { return t+h }, 0); |
var moment = require('moment'); | |
// create truncated date ranges to fill with zeros | |
var enumerateDaysBetweenDates = function(startDate, endDate, granularity) { | |
var dates = []; | |
var currDate = startDate.clone().startOf(granularity); | |
var lastDate = endDate.clone().endOf(granularity); | |
while(currDate.add(granularity, 1).diff(lastDate) < 0) { |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |