uglify | R Documentation |
UglifyJS is a JavaScript compressor/minifier written in JavaScript. It also contains tools that allow one to automate working with JavaScript code.
uglify_reformat(text, beautify = FALSE, ...)
uglify_optimize(text, ...)
uglify_files(files, ...)
text |
a character vector with JavaScript code |
beautify |
prettify (instead of minify) code |
files |
a character vector of filenames |
... |
UglifyJS2 Documentation: https://lisperator.net/uglifyjs/.
code <- "function test(x, y){ x = x || 1; y = y || 1; return x*y;}"
cat(uglify_optimize(code))
cat(uglify_reformat(code, beautify = TRUE, indent_level = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.