prettify-js

Crates.ioprettify-js
lib.rsprettify-js
version0.1.0
sourcesrc
created_at2020-07-17 05:53:07.153843
updated_at2020-07-17 05:53:07.153843
descriptionA fast, robust but imperfect token-based JS code prettifier, written in Rust, that outputs JS source maps
homepage
repositoryhttps://github.com/Pernosco/prettify-js
max_upload_size
id266132
size36,883
Robert O'Callahan (rocallahan)

documentation

https://docs.rs/prettify-js

README

prettify-js

A fast, robust but imperfect token-based JS code prettifier, written in Rust, that outputs JS source maps.

The code was mostly ported from Mozilla's pretty-fast. Instead of using Acorn to tokenize, we use RESS. Instead of using the source-map package to generate source maps, we use our own very minimal handwritten source-map emitter. The original pretty-fast code tries to avoid emitting more than one source-map record per pretty line; instead we emit one source-map record per token, because we sometimes care about code offsets within a pretty line.

Commit count: 4

cargo fmt