Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperapp

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperapp - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "hyperapp",
"description": "1 KB JavaScript library for building web applications.",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/hyperapp.js",

@@ -6,0 +6,0 @@ "module": "src/index.js",

@@ -211,13 +211,13 @@ # <img height=24 src=https://cdn.rawgit.com/JorgeBucaran/f53d2c00bafcf36e84ffd862f0dc2950/raw/882f20c970ff7d61aa04d44b92fc3530fa758bc0/Hyperapp.svg> Hyperapp

{
name: "div",
props: {},
nodeName: "div",
attributes: {},
children: [
{
name: "h1",
props: {},
nodeName: "h1",
attributes: {},
children: 0
},
{
name: "button",
props: {
nodeName: "button",
attributes: {
onclick: function() {/*...*/}

@@ -228,4 +228,4 @@ },

{
name: "button",
props: {
nodeName: "button",
attributes: {
onclick: function() {/*...*/}

@@ -332,3 +332,3 @@ },

If you don't know all the properties that you want to place in a component ahead of time, you can use the [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). Note that Hyperapp components can return multiple elements as in the following example. This technique lets you group a list of children without adding extra nodes to the DOM.
If you don't know all the attributes that you want to place in a component ahead of time, you can use the [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). Note that Hyperapp components can return multiple elements as in the following example. This technique lets you group a list of children without adding extra nodes to the DOM.

@@ -335,0 +335,0 @@ ```jsx

@@ -10,3 +10,3 @@ export function h(name, attributes /*, ...rest*/) {

while (rest.length) {
if ((node = rest.pop()) && node.pop) { // Array?
if ((node = rest.pop()) && node.pop /* Array? */) {
for (length = node.length; length--; ) {

@@ -35,4 +35,4 @@ rest.push(node[length])

var oldNode = rootElement && toVNode(rootElement, [].map)
var globalState = copy(state)
var wiredActions = copy(actions)
var globalState = clone(state)
var wiredActions = clone(actions)

@@ -73,3 +73,3 @@ scheduleRender(wireStateToActions([], globalState, wiredActions))

function copy(target, source) {
function clone(target, source) {
var obj = {}

@@ -88,3 +88,3 @@

path.length > 1 ? set(path.slice(1), value, source[path[0]]) : value
return copy(source, target)
return clone(source, target)
}

@@ -116,3 +116,3 @@ return value

scheduleRender(
(globalState = set(path, copy(state, data), globalState))
(globalState = set(path, clone(state, data), globalState))
)

@@ -127,3 +127,3 @@ }

(state[key] = state[key] || {}),
(actions[key] = copy(actions[key]))
(actions[key] = clone(actions[key]))
)

@@ -140,3 +140,3 @@ }

} else if (name === "style") {
for (var i in copy(oldValue, value)) {
for (var i in clone(oldValue, value)) {
element[name][i] = value == null || value[i] == null ? "" : value[i]

@@ -188,3 +188,3 @@ }

function updateElement(element, oldProps, attributes, isSVG) {
for (var name in copy(oldProps, attributes)) {
for (var name in clone(oldProps, attributes)) {
if (

@@ -191,0 +191,0 @@ attributes[name] !==

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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