davidgohel / prettyfile

prettify and minify XML, JSON, CSS and SQL Files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prettyfile R package

Travis-CI Build Status AppVeyor Build Status

An helper package to help:

  • prettify minified XML, JSON, CSS and SQL Files.
  • minify XML, JSON, CSS and SQL Files.

This is a simple interface with pretty-data.

Example

library(prettyfile)
str <- "<?xml version=\"1.0\" encoding=\"UTF-8\"?><note to=\"david\" from=\"world\">hello</note><note to=\"world\" from=\"david\">hello</note>"
cat( str )
#> <?xml version="1.0" encoding="UTF-8"?><note to="david" from="world">hello</note><note to="world" from="david">hello</note>
test <- beautify_str(str, format = "xml") 
cat( test )
#> <?xml version="1.0" encoding="UTF-8"?>
#> <note to="david" from="world">hello</note>
#> <note to="world" from="david">hello</note>
cat( minify_str(test, format = "xml") )
#> <?xml version="1.0" encoding="UTF-8"?><note to="david" from="world">hello</note><note to="world" from="david">hello</note>

Installation

devtools::install_github("davidgohel/prettyfile")

About

prettify and minify XML, JSON, CSS and SQL Files

License:Other


Languages

Language:JavaScript 59.2%Language:R 40.4%Language:CSS 0.4%