axis-snapshot
Version:
A Node.js library written in TypeScript capable of getting snapshots from Axis Communication cameras.
17 lines • 833 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.toQueryString = toQueryString;
const expect = require("@fantasticfiasco/expect");
function toQueryString(options) {
expect.toBeTrue((options === null || options === void 0 ? void 0 : options.resolution) === undefined || options.resolution.length > 0, 'resolution cannot be an empty string');
expect.toBeTrue((options === null || options === void 0 ? void 0 : options.palette) === undefined || options.palette.length > 0, 'palette cannot be an empty string');
if (options === undefined) {
return null;
}
const parameters = Object.entries(options);
if (parameters.length === 0) {
return null;
}
return parameters.map(([key, value]) => `${key}=${value}`).join('&');
}
//# sourceMappingURL=convert.js.map
;