I hereby claim:
- I am cortfritz on github.
- I am cortfritz (https://keybase.io/cortfritz) on keybase.
- I have a public key ASAc-Ud4oZuQOm5Ki_MJ1LDdMeI9xbn9g_5Mv2bwYg3Ldgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* queryLimited | |
* | |
* @module :: queryLimited | |
* @description :: policy ensures the existence of query variables limit and skip and keeps them in reasonable bounds | |
* @docs :: http://sailsjs.org/#!documentation/policies | |
* | |
*/ | |
module.exports = function queryLimited(req, res, next) { | |
var defaultLimit = 10 |
mixin prettyDate(uglyDate) | |
daysAgo = ((((new Date() - uglyDate) / 1000) / 60) / 60) / 24 | |
hours = uglyDate.getHours() | |
minutes = uglyDate.getMinutes() | |
ampm = hours >= 12 ? 'pm' : 'am' | |
hours = hours % 12 | |
hours = hours ? hours : 12 | |
minutes = minutes < 10 ? '0'+minutes : minutes | |
strTime = hours + ':' + minutes + ' ' + ampm |