Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 5951bd3a authored by echicken's avatar echicken 🐔
Browse files

has_params

parent fdd93709
// Helpers for http_request
var Request = {
// Query parameter p exists and first instance is of optional type t
// Query parameter p exists
has_param: function (p) {
return (Array.isArray(http_request.query[p]) && http_request.query[p].length);
},
// All query parameters in Array[String] p exist
has_params: function (p) {
return p.every(function (e) {
return (Array.isArray(http_request.query[e]) && http_request.query[e].length);
});
},
// First instance of query parameter p, or undefined
get_param: function (p) {
if (Array.isArray(http_request.query[p]) && http_request.query[p].length) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment