Skip to content

Instantly share code, notes, and snippets.

@VanDalkvist
Last active August 29, 2015 14:04
Show Gist options
  • Save VanDalkvist/60da295a878d4499d592 to your computer and use it in GitHub Desktop.
Save VanDalkvist/60da295a878d4499d592 to your computer and use it in GitHub Desktop.
some utils
.constant('Utils', (function () {
return {
addRange: function (dest, source, mapFunction) {
_.forEach(source, function (elem) {
dest.push(mapFunction ? mapFunction(elem) : elem);
});
},
resetMomentTime: function (moment) {
return moment.hour(0).minute(0).second(0).millisecond(0);
}
};
})())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment