ddg-bulk-image-downloader
Version:
Lazy way to download images from Duck Duck Go search results in bulk
18 lines (17 loc) • 581 B
JavaScript
;
// import {ImageFilterOption} from './types'
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterOptionsToParam = void 0;
const filterOptionsToParam = (options) => {
const result = [];
if (!options)
return "";
const validOptions = ["size", "type", "layout", "color"];
for (const [key, value] of Object.entries(options)) {
if (value && validOptions.includes(key)) {
result.push(`${key}:${value}`);
}
}
return result.join(",");
};
exports.filterOptionsToParam = filterOptionsToParam;