reindent_V8 {prettifyAddins} | R Documentation |
Reindent code using V8
Description
Reindent some code using the V8 package.
Usage
reindent_V8(contents = NA, language = NA, tabSize = NULL)
Arguments
contents |
the code to be reindented; there are three possibilities for
this argument:
|
language |
the language of the code, such as |
tabSize |
number of spaces of the indentation (usually |
Value
The reindented code in a character string.
Examples
library(prettifyAddins)
code <- c(
"function f(x){",
"return x+1",
"}"
)
cat(reindent_V8(code, "javascript"))
[Package prettifyAddins version 2.6.1 Index]