New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html2json

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html2json - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

.gitmodules

9

package.json
{
"name": "html2json",
"version": "0.0.0",
"version": "0.0.1",
"description": "html to json & json to html",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"test": ""
"test": "mocha"
},

@@ -26,3 +26,6 @@ "repository": {

},
"homepage": "https://github.com/jxck/html2json#readme"
"homepage": "https://github.com/jxck/html2json#readme",
"devDependencies": {
"mocha": "^2.4.5"
}
}

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

html2json & json2html
============================================
# html2json & json2html

@@ -12,4 +11,6 @@ ## Requirements

<script src="http://ejohn.org/files/htmlparser.js"></script>
<script src="lib/html2json.js"></script>
```html
<script src="http://ejohn.org/files/htmlparser.js"></script>
<script src="lib/html2json.js"></script>
```

@@ -19,32 +20,32 @@ json:

```javascript
var json = {
tag: 'div',
attr: {
id: '1',
class: ['foo']
},
child: [{
tag: 'h2',
text: 'sample text with <code>inline tag</code>'
},{
tag: 'pre',
attr: {
id: 'demo',
class: ['foo', 'bar']
}
},{
tag: 'pre',
attr: {
id: 'output',
class: ['goo']
}
},{
tag: 'input',
attr: {
id: 'execute',
type: 'button',
value: 'execute'
}
}]
};
var json = {
tag: 'div',
attr: {
id: '1',
class: ['foo']
},
child: [{
tag: 'h2',
text: 'sample text with <code>inline tag</code>'
},{
tag: 'pre',
attr: {
id: 'demo',
class: ['foo', 'bar']
}
},{
tag: 'pre',
attr: {
id: 'output',
class: ['goo']
}
},{
tag: 'input',
attr: {
id: 'execute',
type: 'button',
value: 'execute'
}
}]
};
```

@@ -55,8 +56,8 @@

```html
<div id="1" class="foo">
<h2>sample text with <code>inline tag</code></h2>
<pre id="demo" class="foo bar"></pre>
<pre id="output" class="goo"></pre>
<input id="execute" type="button" value="execute"/>
</div>
<div id="1" class="foo">
<h2>sample text with <code>inline tag</code></h2>
<pre id="demo" class="foo bar"></pre>
<pre id="output" class="goo"></pre>
<input id="execute" type="button" value="execute"/>
</div>
```

@@ -67,4 +68,4 @@

```javascript
json === html2json(html);
html === json2html(json);
json === html2json(html);
html === json2html(json);
```

@@ -79,3 +80,2 @@

???
MIT
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