Code Monkey home page Code Monkey logo

pretty-data's Introduction

piv-pretty-data - Nodejs plugin

nodejs plugin to pretty-print or minify text in XML, JSON, CSS and SQL formats.

Version - 1.0.0

Copyright (c) 2012 Vadim Kiryukhin ( vkiryukhin @ gmail.com ) Copyright (c) 2018 Pieter Van Poyer

License: Dual licensed under the MIT and GPL licenses:

http://www.opensource.org/licenses/mit-license.php

http://www.gnu.org/licenses/gpl.html

##Description

  • pd.xml(data ) - pretty print XML;

  • pd.json(data) - pretty print JSON;

  • pd.css(data ) - pretty print CSS;

  • pd.sql(data ) - pretty print SQL;

  • pd.xmlmin(data [, preserveComments]) - minify XML;

  • pd.jsonmin(data) - minify JSON text;

  • pd.cssmin(data [, preserveComments] ) - minify CSS text;

  • pd.sqlmin(data) - minify SQL text;

PARAMETERS:

@data - String; XML, JSON, CSS or SQL text to beautify;

@preserveComments - Bool (optional, used in npp.minxml and npp.mincss only); Set this flag to true to prevent removing comments from @data;

@Return - String;

USAGE:

var pd = require('pretty-data').pd;

var xml_pp = pd.xml(data);

var xml_min = pd.xmlmin(data [,true]);

var json_pp = pd.json(data);

var json_min = pd.jsonmin(data);

var css_pp = pd.css(data);

var css_min = pd.cssmin(data [, true]);

var sql_pp = pd.sql(data);

var sql_min = pd.sqlmin(data);

pretty-data's People

Contributors

vkiryukhin avatar dordille avatar legomushroom avatar pietervanpoyer avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.