Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ module.exports = function(buffer, opts) {
if (typeof opts === 'boolean') {
mode = opts ? 0 : 1;
} else if (typeof opts === 'object') {
quality = opts.quality || 11;
mode = opts.mode || 0;
lgwin = opts.lgwin || 22;
dictionary = opts.dictionary || "";
quality = opts.quality ?? 11;
mode = opts.mode ?? 0;
lgwin = opts.lgwin ?? 22;
dictionary = opts.dictionary ?? "";
}

// allocate input buffer and copy data to it
Expand Down