Limit VNC size by default.

This commit is contained in:
Simo Kinnunen
2015-09-15 04:25:21 +09:00
parent d5bfcb16d4
commit 9d20484dcb
5 changed files with 29 additions and 5 deletions

View File

@@ -2,6 +2,11 @@ module.exports.list = function(val) {
return val.split(/\s*,\s*/g).filter(Boolean)
}
module.exports.size = function(val) {
var match = /^(\d+)x(\d+)$/.exec(val)
return match ? [+match[1], +match[2]] : undefined
}
module.exports.allUnknownArgs = function(args) {
return [].slice.call(args, 0, -1).filter(Boolean)
}