[−][src]Function prettify_js::should_prettyprint
pub fn should_prettyprint(source_str: &str) -> bool
Uses a heuristic to decide if the source file needs prettyprinting: whether its average line length is > 100.
We also prettyprint if the source string starts with "//PRETTYPRINT". This is useful for testing.