use-ecmascript 0.0.1

ECMAScript edition and target primitives for RustUse
Documentation
  • Coverage
  • 20.41%
    10 out of 49 items documented1 out of 10 items with examples
  • Size
  • Source code size: 14.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 719.9 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-js
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

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");
# Ok::<(), use_ecmascript::EcmaScriptParseError>(())

Scope

  • ECMAScript target labels from ES5 through ES2024 and ESNext.
  • 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.