Escapar Unicode
unicode-escapeEscapa caracteres no ASCII como \uXXXX, \u{X} o U+XXXX. Cuándo: hay que convertir bytes o texto a esta codificación, o desde ella, con exactitud y sin adivinar. No para: convertir escapes \uXXXX, \u{X}, \xXX y U+XXXX en caracteres (unicode-unescape). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Escapes non-ASCII characters as \uXXXX (JSON/JS, UTF-16 surrogates), \u{X} (ES6), or U+XXXX notation. When: bytes or text have to be converted to or from this encoding exactly, without guessing. Not for: converting \uXXXX (unicode-unescape). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Escape ASCII too (boolean; optional; default false). | |
| text | Yes | Text (string; required). | |
| style | No | Escape style (optional; one of: json, es6, codepoint; default "json"). | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| escaped | No |