Socket
Socket
Sign inDemoInstall

hyperscript

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperscript - npm Package Compare versions

Comparing version 1.4.0 to 1.4.2

3

index.js
var split = require('browser-split')
var ClassList = require('class-list')
var DataSet = require('data-set')
require('html-element')

@@ -90,3 +89,3 @@

} else if (k.substr(0, 5) === "data-") {
DataSet(e)[k.substr(5)] = l[k]
e.setAttribute(k, l[k])
} else {

@@ -93,0 +92,0 @@ e[k] = l[k]

{
"name": "hyperscript",
"version": "1.4.0",
"version": "1.4.2",
"homepage": "https://github.com/dominictarr/hyperscript",

@@ -12,4 +12,3 @@ "repository": {

"devDependencies": {
"html-element": "~1.1.0",
"tape": "~0.2.2",
"tape": "~2.13.3",
"observable": "~2.1.2",

@@ -22,5 +21,3 @@ "ispy": "~0.1.2",

"browser-split": "0.0.0",
"data-set": "~0.2.2",
"html-element": "~1.2.8",
"tape": "~2.3.0"
"html-element": "~1.3.0"
},

@@ -27,0 +24,0 @@ "browser": {

@@ -10,2 +10,5 @@ # HyperScript

See also [mercury](https://github.com/Raynos/mercury) is a modular ui
framework influenced by hyperscript but much more heavily optimized.
## Example

@@ -59,3 +62,3 @@

If an `{}` object is passed in, it's values will be used to set attributes.
If an `{}` object is passed in it will be used to set attributes.

@@ -67,2 +70,10 @@ ``` js

Note that hyperscript sets properties on the DOM element object, not
attributes on the HTML element. This makes for better consistency across
browsers and a nicer API for booleans. There are some gotchas, however.
Attributes such as `colspan` are camel cased to `colSpan`, and `for` on the
label element is `htmlFor` to avoid collision with the language keyword. See the
[DOM HTML specification](http://www.w3.org/TR/DOM-Level-2-HTML/html.html)
for details.
### events

@@ -69,0 +80,0 @@

@@ -137,3 +137,3 @@

var p = _h('p', {style: {color: color}, className: className}, text)
t.equal(p.outerHTML, '<p class=\"para\" style=\"color: red;\">hello</p>')
t.equal(p.outerHTML, '<p style=\"color: red; \" class=\"para\">hello</p>')
_h.cleanup()

@@ -143,3 +143,3 @@ color('blue')

className('section')
t.equal(p.outerHTML, '<p class=\"para\" style=\"color: red;\">hello</p>')
t.equal(p.outerHTML, '<p style=\"color: red; \" class=\"para\">hello</p>')
t.end()

@@ -146,0 +146,0 @@ })

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