You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to quickly and conveniently disable all console.log statements in my code?
With a JavaScript mangler and compressor toolkit like Terser you can pass console.log to CLI compress options π
You need to pass --compress (-c) to enable the compressor. Optionally you can pass a comma-separated list of compress options.
You can pass an array of names and Terser will assume that those functions do not produce side effects.
You can pass pure_funcs: [ 'Math.floor' ] to let it know that this function won't produce any side effect, in which case the whole statement would get discarded.
This combination of PostgreSQLCOPY ... TO PROGRAM and sed escaped properly the double quotes in a json compressed gzip data dumpπ
\copy (
SELECT json_agg(row_to_json(T)) :: textFROM (
SELECT title, author, year FROM books WHERE category NOT LIKE'fiction'
) AS T
) TO PROGRAM
'sed ''s~\\\\~\\~g'' | gzip > ./books-`date +"%Y%m%d-%H%M%S"`.json.gz' ;
gh GitHub CLI integrates now jq with --jq <expression> to filter JSON output using a jq expression as documented on GitHub CLI Manual https://cli.github.com/manual/gh_issue_list.