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

realdom

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

realdom - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "realdom",
"version": "0.0.7",
"version": "0.0.8",
"author": "Fedot Kriutchenko <fodyadev@gmail.com>",

@@ -5,0 +5,0 @@ "description": "",

@@ -1,2 +0,1 @@

import { runWithState, getCurrentHandler } from './state.js';
import { argsToArray, isReactive, toString, kebab } from './common.js';

@@ -8,4 +7,4 @@

? (args[0] = tasks, effect(...args))
: Builder(effect, [...tasks, { names, args }], []),
{ get: (_, k) => k === symbol
: Builder(effect, [...tasks, { names, args }], []), {
get: (_, k) => k === symbol
? effect[k]

@@ -35,3 +34,3 @@ : Builder(effect, tasks, [...names, k])

const textContent = Operator(true, (node, _, args) => {
const textContent = Operator(isReactive, (node, _, args) => {
node.textContent = toString(args);

@@ -50,16 +49,14 @@ });

let child = init ? null : node.firstChild;
const append = item => node.appendChild(item(symbol, null, init));
const apply = item => item(symbol, node, init);
const hydrate = item => (item(symbol, child, init), child = child.nextSibling);
for (const item of argsToArray(content)) switch (item[symbol]) {
case 1:
if (init) node.appendChild(item(symbol, null, init));
else (item(symbol, child, init), child = child.nextSibling);
break;
case 2: item(symbol, node, init); break;
case 1: (init ? append : hydrate)(item); break;
case 2: apply(item); break;
default:
if (tag === '' || tag === '!') textContent(item)(symbol, node, init);
else if (init)
node.appendChild(Element('')(textContent(item))(symbol, null, init));
else {
textContent(item)(symbol, child, init);
child = child.nextSibling;
}
const text = textContent(item);
if (tag === '' || tag === '!') apply(text);
else if (init) append(Element('')(text));
else hydrate(text);
}

@@ -66,0 +63,0 @@ return node;

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