I have tested this on compress-json 1.0.5 and 2.0.1
Welcome to Node.js v16.11.0.
Type ".help" for more information.
> const {compress} = require('compress-json');
undefined
> compress({test: undefined});
Uncaught TypeError: unsupported data type: [object Undefined]
at Object.throwUnknownDataType (.../node_modules/compress-json/dist/debug.js:8:11)
at addValue (.../node_modules/compress-json/dist/memory.js:148:20)
at Object.addValue (.../node_modules/compress-json/dist/memory.js:136:31)
at compress (.../node_modules/compress-json/dist/core.js:8:27)
I have tested this on compress-json 1.0.5 and 2.0.1