Comparing version 0.0.3 to 0.1.0
{ | ||
"name": "domify", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "turn HTML into DOM elements", | ||
@@ -5,0 +5,0 @@ "keywords": ["dom", "html", "client", "browser", "component"], |
0.1.0 / 2012-10-24 | ||
================== | ||
* add support for body elements with classes [timoxley] | ||
* add removal of dummy parent div [timoxley] | ||
* fix tests | ||
* fix Makefile | ||
0.0.3 / 2012-08-28 | ||
@@ -3,0 +11,0 @@ ================== |
20
index.js
@@ -38,5 +38,5 @@ | ||
if (tag == 'body') { | ||
var el = document.createElement('body'); | ||
el.innerHTML = stripBody(html); | ||
return el; | ||
var el = document.createElement('html'); | ||
el.innerHTML = html; | ||
return el.removeChild(el.lastChild); | ||
} | ||
@@ -57,15 +57,3 @@ | ||
return el.lastChild; | ||
return el.removeChild(el.lastChild); | ||
}; | ||
/** | ||
* Strip body tags from `html`. | ||
* | ||
* @param {String} html | ||
* @return {String} | ||
* @api private | ||
*/ | ||
function stripBody(html) { | ||
return html.replace(/^\s*<body[^>]*>/, '').replace(/<\/body>\s*$/, ''); | ||
} |
{ | ||
"name": "domify" | ||
, "version": "0.0.3" | ||
, "version": "0.1.0" | ||
, "description": "turn HTML into DOM elements" | ||
@@ -5,0 +5,0 @@ , "keywords": ["dom", "html", "client", "browser", "component"] |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
9171
10
258
0
6
2