use-js-keyword 0.0.1

JavaScript keyword and reserved-word primitives for RustUse
Documentation
  • Coverage
  • 14.55%
    8 out of 55 items documented1 out of 8 items with examples
  • Size
  • Source code size: 11.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 578.4 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s 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-js-keyword

JavaScript keyword and reserved-word primitives for RustUse.

Experimental

use-js-keyword is experimental while use-js remains below 0.3.0.

Example

use use_js_keyword::{JsKeyword, is_js_keyword, is_js_reserved_word};

let keyword: JsKeyword = "await".parse()?;

assert_eq!(keyword.as_str(), "await");
assert!(is_js_keyword("class"));
assert!(is_js_reserved_word("interface"));
# Ok::<(), use_js_keyword::JsKeywordParseError>(())

Scope

  • Common JavaScript keywords.
  • Common future and strict-mode reserved words.
  • Lightweight vocabulary checks for metadata and validation helpers.

Non-goals

  • Context-sensitive parser behavior.
  • Version-specific reserved-word tables.
  • Full ECMAScript lexical analysis.

License

Licensed under either Apache-2.0 or MIT.