mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-04 08:23:37 +00:00
update nginx/dep updates/fix eslint/change line endings
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const moment = require('moment');
|
||||
|
||||
module.exports = {
|
||||
|
||||
/**
|
||||
* Takes an expression such as 30d and returns a moment object of that date in future
|
||||
*
|
||||
@@ -21,12 +20,11 @@ module.exports = {
|
||||
* @returns {Object}
|
||||
*/
|
||||
parseDatePeriod: function (expression) {
|
||||
let matches = expression.match(/^([0-9]+)(y|Q|M|w|d|h|m|s|ms)$/m);
|
||||
const matches = expression.match(/^([0-9]+)(y|Q|M|w|d|h|m|s|ms)$/m);
|
||||
if (matches) {
|
||||
return moment().add(matches[1], matches[2]);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user