We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
charCodeAt
Code point is differ from char code which is returned by String.prototype.charCodeAt. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt#description
String.prototype.charCodeAt
"use strict"; const k = (() => { return "👨👩👦".charCodeAt(0); })
{ "jsc": { "parser": { "syntax": "ecmascript", "jsx": false }, "target": "es5", "loose": false, "minify": { "compress": { "arguments": false, "arrows": true, "booleans": true, "booleans_as_integers": false, "collapse_vars": true, "comparisons": true, "computed_props": true, "conditionals": true, "dead_code": true, "directives": true, "drop_console": false, "drop_debugger": true, "evaluate": true, "expression": false, "hoist_funs": false, "hoist_props": true, "hoist_vars": false, "if_return": true, "join_vars": true, "keep_classnames": false, "keep_fargs": true, "keep_fnames": false, "keep_infinity": false, "loops": true, "negate_iife": true, "properties": true, "reduce_funcs": false, "reduce_vars": false, "side_effects": true, "switches": true, "typeofs": true, "unsafe": false, "unsafe_arrows": false, "unsafe_comps": false, "unsafe_Function": false, "unsafe_math": false, "unsafe_symbols": false, "unsafe_methods": false, "unsafe_proto": false, "unsafe_regexp": false, "unsafe_undefined": false, "unused": true, "const_to_let": true, "pristine_globals": true }, "mangle": false } }, "module": { "type": "commonjs" }, "minify": false, "isModule": false }
https://play.swc.rs/?version=1.5.5&code=H4sIAAAAAAAAA1MqLU5VKC4pykwuUbLmSs7PKy5RyFawVdDQ0FSwtVOo5lIAgqLUktKiPAWlD%2FMnrnjU0AukVkKoZUp6yRmJRc75KamOJRoGmtZctZoAAHg2xlIAAAA%3D&config=H4sIAAAAAAAAA32UO5LbMAyG%2Bz2FR3XaNDlAupyBQ5OgTIckNATotWbHdw%2F08CNrSJ2EDz9AAiC%2BPg6H7kyu%2B3X4kk%2F5GWwlqI9%2FsdBY2F7F0oHLllyNA3c%2F7vRMEwo2Ecym20I6trUHnlX0c3XvEiLB3X215VhiGF8TOsxDBaIXm1glXstQmP7Xr6zi5wS4tlf7ETGBLTvEWDKxMPRQtcAOU7IDgbnYqkSZTmprJNRSTLAxeDNUHFRefOSIRXK%2BUw%2FWG4ceFBQrOI4X0GSSS2SF5HrKfWbs4dj6fm7yNzVcbGqWlZxwnVsip1WinjASm9CKVsIFbtRggWtxvytjMBW41fKuO2MsGz35CyAVSJao2Axa3NkjyDxtqcOuMpYgI8ujwmW%2BtVsW6KWoJsagVHaqDFSOWjcr%2BOZgqqzTjrPijfJR9GAgBJkVJTR9RnYnLSmPA2BQgPTXBm2qFmAer3CDTw9iB%2F%2BWW7I%2BYKtHtnzapjTmI6adBBn4hH7HQVrBuI2rbInrsM1b8SCjAV51aTSD9yUgD4DRpHlZvs2GPA%2BJaPqEx%2BeaWB1ujyWcbemf733Zwx%2BrQ5fRtxmuG37q77SXpR0Zy5m6p%2Bd9FT9O30X6c5cvsW%2F%2FAHrujcQzBgAA
No response
the char code of the first character of "👨👩👦" is 55357.
minifier evaluates it as 128104, which is the code point of the first character.
1.5.5
The text was updated successfully, but these errors were encountered:
String.charCodeAt
fix(es/minifier): Fix evaluation of String.charCodeAt (#8946)
772c50f
**Related issue:** - Closes #8943
kdy1
Successfully merging a pull request may close this issue.
Describe the bug
Code point is differ from char code which is returned by
String.prototype.charCodeAt
.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt#description
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.5.5&code=H4sIAAAAAAAAA1MqLU5VKC4pykwuUbLmSs7PKy5RyFawVdDQ0FSwtVOo5lIAgqLUktKiPAWlD%2FMnrnjU0AukVkKoZUp6yRmJRc75KamOJRoGmtZctZoAAHg2xlIAAAA%3D&config=H4sIAAAAAAAAA32UO5LbMAyG%2Bz2FR3XaNDlAupyBQ5OgTIckNATotWbHdw%2F08CNrSJ2EDz9AAiC%2BPg6H7kyu%2B3X4kk%2F5GWwlqI9%2FsdBY2F7F0oHLllyNA3c%2F7vRMEwo2Ecym20I6trUHnlX0c3XvEiLB3X215VhiGF8TOsxDBaIXm1glXstQmP7Xr6zi5wS4tlf7ETGBLTvEWDKxMPRQtcAOU7IDgbnYqkSZTmprJNRSTLAxeDNUHFRefOSIRXK%2BUw%2FWG4ceFBQrOI4X0GSSS2SF5HrKfWbs4dj6fm7yNzVcbGqWlZxwnVsip1WinjASm9CKVsIFbtRggWtxvytjMBW41fKuO2MsGz35CyAVSJao2Axa3NkjyDxtqcOuMpYgI8ujwmW%2BtVsW6KWoJsagVHaqDFSOWjcr%2BOZgqqzTjrPijfJR9GAgBJkVJTR9RnYnLSmPA2BQgPTXBm2qFmAer3CDTw9iB%2F%2BWW7I%2BYKtHtnzapjTmI6adBBn4hH7HQVrBuI2rbInrsM1b8SCjAV51aTSD9yUgD4DRpHlZvs2GPA%2BJaPqEx%2BeaWB1ujyWcbemf733Zwx%2BrQ5fRtxmuG37q77SXpR0Zy5m6p%2Bd9FT9O30X6c5cvsW%2F%2FAHrujcQzBgAA
SWC Info output
No response
Expected behavior
the char code of the first character of "👨👩👦" is 55357.
Actual behavior
minifier evaluates it as 128104, which is the code point of the first character.
Version
1.5.5
Additional context
No response
The text was updated successfully, but these errors were encountered: