[−][src]Function minifier::js::simple_minify
pub fn simple_minify<'a>(source: &'a str) -> Tokens<'a>
Simple function to get the untouched token list. Useful in case you want to perform some actions directly on it.
Example
extern crate minifier; use minifier::js::simple_minify; use std::fs; fn main() { let content = fs::read("some_file.js").expect("file not found"); let source = String::from_utf8_lossy(&content); let s = simple_minify(&source); println!("result: {:?}", s); // We now have the tokens list. }