hyperscript
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -16,2 +16,4 @@ var split = require('browser-split') | ||
var m = split(string, /([\.#]?[a-zA-Z0-9_-]+)/) | ||
if(/^\.|#/.test(m[1])) | ||
e = document.createElement('div') | ||
forEach(m, function (v) { | ||
@@ -18,0 +20,0 @@ var s = v.substring(1,v.length) |
{ | ||
"name": "hyperscript", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"homepage": "https://github.com/dominictarr/hyperscript", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -51,2 +51,6 @@ # HyperScript | ||
### default tag name | ||
If the tag name begins with a class or id, it defaults to a `<div>`. | ||
### Attributes | ||
@@ -53,0 +57,0 @@ |
@@ -39,2 +39,8 @@ | ||
test('can default element types', function(t){ | ||
t.equal(h('.panel').outerHTML, '<div class="panel"></div>') | ||
t.equal(h('#frame').outerHTML, '<div id="frame"></div>') | ||
t.end() | ||
}) | ||
test('can set properties', function(t){ | ||
@@ -41,0 +47,0 @@ var a = h('a', {href: 'http://google.com'}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45417
259
159