Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pretty-data

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-data - npm Package Compare versions

Comparing version 0.30.1 to 0.30.3

2

package.json
{
"name": "pretty-data",
"version": "0.30.1",
"version": "0.30.3",
"author": "Vadim Kiryukhin <vkiryukhin@gmail.com>",

@@ -5,0 +5,0 @@ "description": "plugin to pretty print or minify XML, JSON, CSS and SQL files",

/**
* pretty-data - nodejs plugin to pretty-print or minify data in XML, JSON and CSS formats.
*
* Version - 0.30.1
* Version - 0.30.3
* Copyright (c) 2012 Vadim Kiryukhin

@@ -47,3 +47,3 @@ * vkiryukhin @ gmail.com

this.shift = ['\n']; // array of shifts
this.step = ' ', // 2 spaces
this.step = ' ', // 2 spaces
maxdeep = 100, // nesting level

@@ -63,3 +63,3 @@ ix = 0;

var ar = text.replace(/>\s{0,}</g,"><").replace(/</g,"~#~<").split('~#~'),
var ar = text.replace(/>\s{0,}</g,"><").replace(/</g,"~::~<").split('~::~'),
len = ar.length,

@@ -88,3 +88,3 @@ inComment = false,

if( /^<\w/.exec(ar[ix-1]) && /^<\/\w/.exec(ar[ix]) &&
/^<\w+/.exec(ar[ix-1]) == /^<\/\w+/.exec(ar[ix])[0].replace('/','')) {
/^<[\w:\-\.\,]+/.exec(ar[ix-1]) == /^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')) {
str += ar[ix];

@@ -124,11 +124,11 @@ if(!inComment) deep--;

var ar = this.jsonmin(text).replace(/\{/g,"~#~{~#~")
.replace(/\[/g,"[~#~")
.replace(/\}/g,"~#~}")
.replace(/\]/g,"~#~]")
.replace(/\"\,/g,'",~#~')
.replace(/\,\"/g,',~#~"')
.replace(/\]\,/g,'],~#~')
.replace(/~#~\s{0,}~#~/g,"~#~")
.split('~#~'),
var ar = this.jsonmin(text).replace(/\{/g,"~::~{~::~")
.replace(/\[/g,"[~::~")
.replace(/\}/g,"~::~}")
.replace(/\]/g,"~::~]")
.replace(/\"\,/g,'",~::~')
.replace(/\,\"/g,',~::~"')
.replace(/\]\,/g,'],~::~')
.replace(/~::~\s{0,}~::~/g,"~::~")
.split('~::~'),

@@ -164,9 +164,9 @@ len = ar.length,

var ar = text.replace(/\s{1,}/g,' ')
.replace(/\{/g,"{~#~")
.replace(/\}/g,"~#~}~#~")
.replace(/\;/g,";~#~")
.replace(/\/\*/g,"~#~/*")
.replace(/\*\//g,"*/~#~")
.replace(/~#~\s{0,}~#~/g,"~#~")
.split('~#~'),
.replace(/\{/g,"{~::~")
.replace(/\}/g,"~::~}~::~")
.replace(/\;/g,";~::~")
.replace(/\/\*/g,"~::~/*")
.replace(/\*\//g,"*/~::~")
.replace(/~::~\s{0,}~::~/g,"~::~")
.split('~::~'),
len = ar.length,

@@ -173,0 +173,0 @@ deep = 0,

@@ -1,2 +0,2 @@

# pretty-data
# pretty-data - Nodejs plugin

@@ -6,3 +6,3 @@ nodejs plugin to **pretty-print** or **minify**

**Version** - 0.30.1
**Version** - 0.30.3

@@ -9,0 +9,0 @@ **Copyright** (c) 2012 Vadim Kiryukhin ( vkiryukhin @ gmail.com )

var xml = '<a> <b> <c>zz xxx zz</c>\n <!-- comment --> <d/> \n</b>\n</a>',
var xml = '<a> <b> <c>zz xxx zz</c>\n <!-- comment --> <d/> \n</b>\n <xs:tt> <xs:ttb/> </xs:tt> </a>',
pp_xml = require('../pretty-data').pd.xml(xml),

@@ -4,0 +4,0 @@ pp_xmlmin_com = require('../pretty-data').pd.xmlmin(xml,true),

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc