Comparing version 0.0.0 to 0.0.1
{ | ||
"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 |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
12
1
27227
1
657
1