Expand description
§use-ecmascript
ECMAScript edition and target primitives for RustUse.
§Experimental
use-ecmascript is experimental while use-js remains below 0.3.0.
§Example
use use_ecmascript::{ES2024, EcmaScriptTarget};
let target: EcmaScriptTarget = "es2024".parse()?;
assert_eq!(target, ES2024);
assert_eq!(target.to_string(), "ES2024");§Scope
- ECMAScript target labels from
ES5throughES2024andESNext. - Lightweight parsing from common target strings.
- Display and version helpers for build-tool metadata.
§Non-goals
- JavaScript parsing or execution.
- Feature tables for every ECMAScript edition.
- Browser, runtime, or transpiler compatibility data.
§License
Licensed under either Apache-2.0 or MIT.
Structs§
- Ecma
Script Year - Calendar year for annual ECMAScript editions.
Enums§
- Ecma
Script Edition - ECMAScript edition numbers for commonly named targets.
- Ecma
Script Parse Error - Error returned while parsing ECMAScript labels.
- Ecma
Script Target - Common ECMAScript language target labels.