oxc/crates
sapphi-red 835b25889b
feat(minifier): compress typeof foo === 'object' && foo !== null to typeof foo == 'object' && !!foo (#8638)
If `typeof foo == 'object'`, then `foo` is guaranteed to be an object or null. In that case, `foo !== null` can be replaced with `!!foo` because objects return `true` for `!!foo` and null returns `false` for it.

**References**
- [Spec of `typeof`](https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-typeof-operator)
- [Spec of `!`](https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-logical-not-operator)
- [Spec of `ToBoolean`](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-toboolean)
2025-01-21 14:59:25 +00:00
..
oxc release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_allocator docs(allocator): improve docs for Allocator (#8623) 2025-01-21 04:01:41 +00:00
oxc_ast refactor(ast): align #[estree(via)] behavior (#8599) 2025-01-19 20:44:33 +00:00
oxc_ast_macros release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_cfg release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_codegen perf(codegen): do not check for comments if turned off (#8598) 2025-01-19 09:07:24 +00:00
oxc_data_structures release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_diagnostics release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_ecmascript fix(minifier): remove expression statement void 0 (#8602) 2025-01-19 14:47:00 +00:00
oxc_estree release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_isolated_declarations refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax (#8643) 2025-01-21 14:20:07 +00:00
oxc_language_server refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax (#8643) 2025-01-21 14:20:07 +00:00
oxc_linter refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax (#8643) 2025-01-21 14:20:07 +00:00
oxc_macros chore(deps): update rust crates (#8452) 2025-01-15 13:29:46 +00:00
oxc_mangler refactor(span): derive Copy on Atom (#8596) 2025-01-19 16:14:23 +08:00
oxc_minifier feat(minifier): compress typeof foo === 'object' && foo !== null to typeof foo == 'object' && !!foo (#8638) 2025-01-21 14:59:25 +00:00
oxc_napi release(crates): v0.47.1 (#8593) 2025-01-19 09:44:29 +08:00
oxc_parser refactor(parser): shorten code (#8640) 2025-01-21 14:36:00 +00:00
oxc_prettier refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax (#8643) 2025-01-21 14:20:07 +00:00
oxc_regular_expression refactor(span): derive Copy on Atom (#8596) 2025-01-19 16:14:23 +08:00
oxc_semantic refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax (#8643) 2025-01-21 14:20:07 +00:00
oxc_span refactor(span)!: remove PartialEq impl for &Atom (#8642) 2025-01-21 14:20:06 +00:00
oxc_syntax refactor(span): deal only in owned Atoms (#8641) 2025-01-21 14:20:06 +00:00
oxc_transformer refactor(isolated_declarations, linter, minifier, prettier, semantic, transformer): remove unnecessary ref / ref mut syntax (#8643) 2025-01-21 14:20:07 +00:00
oxc_traverse refactor(span): derive Copy on Atom (#8596) 2025-01-19 16:14:23 +08:00
oxc_wasm feat(napi/minify): implement napi (#8478) 2025-01-14 08:55:55 +00:00