INNER CODE UNIT · JavaScript
append
cyrus-and/chrome-har-capturer · bin/cli.js:9
function append(value, array) {
array.push(value);
return array;
}
program
.usage('[options] URL...')
.option('-t, --host <host>', 'Chrome Debugging Protocol host')
.option('-p, --port <port>', 'Chrome Debugging Protocol port')
.option('-x, --width <dip>', 'frame width in DIP', parseInt)
.option('-y, --height <dip>', 'frame height in DIP', parseInt)
.option('-o, --output <file>', 'write to file instead of stdout')
.option('-c, --content', 'also capture the requests body')
.option('-k, --cache', 'allow caching')
.option('-a, --agent <agent>', 'user agent override')
.option('-b, --block <URL>', 'URL pattern (*) to block (can be repeated)', append, [])
.option('-H, --header <header>', 'Additional headers (can be repeated)', append, [])
.option('-i, --insecure', 'ignore certificate errors')