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

aurumjs

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurumjs - npm Package Compare versions

Comparing version 0.9.12 to 0.9.13

2

package.json
{
"name": "aurumjs",
"version": "0.9.12",
"version": "0.9.13",
"main": "prebuilt/esnext/aurumjs.js",

@@ -5,0 +5,0 @@ "type": "module",

@@ -12,3 +12,6 @@ import { EventEmitter } from '../aurumjs.js';

});
[Symbol.iterator](): Iterator<VDOMNode>;
[Symbol.iterator](): Iterator<{
node: VDOMNode;
parent: VDOMNode;
}>;
private iterateVDOM;

@@ -15,0 +18,0 @@ }

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

import { EventEmitter } from '../aurumjs.js';
import { dsMicroDebounce, dsTap, EventEmitter } from '../aurumjs.js';
import { createAPI } from '../rendering/aurum_element.js';

@@ -18,10 +18,10 @@ import { ArrayDataSource, DataSource } from '../stream/data_source.js';

for (const node of this.roots) {
yield* this.iterateVDOM(node);
yield* this.iterateVDOM(node, undefined);
}
}
*iterateVDOM(node) {
yield node;
*iterateVDOM(node, parent) {
yield { node, parent };
if (node.children) {
for (const child of node.children) {
yield* this.iterateVDOM(child);
yield* this.iterateVDOM(child, node);
}

@@ -37,9 +37,12 @@ }

let renderToken = new CancellationToken();
sessionToken.chain(renderToken);
root.onChange.subscribe(() => {
sessionToken.addCancelable(() => {
if (renderToken) {
renderToken.cancel();
}
});
DataSource.fromEvent(root.onChange, sessionToken).transform(dsMicroDebounce(), dsTap(() => {
renderToken.cancel();
renderToken = new CancellationToken();
sessionToken.chain(renderToken);
root.roots = aurumToVDOMInternal(content, renderToken, root.onChange);
}, sessionToken);
}), sessionToken);
root.roots = aurumToVDOMInternal(content, renderToken, root.onChange);

@@ -46,0 +49,0 @@ return root;

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

import { EventEmitter } from '../aurumjs.js';
import { dsMicroDebounce, dsTap, EventEmitter } from '../aurumjs.js';
import { AurumElementModel, createAPI, Renderable } from '../rendering/aurum_element.js';

@@ -18,13 +18,13 @@ import { ArrayDataSource, DataSource } from '../stream/data_source.js';

*[Symbol.iterator](): Iterator<VDOMNode> {
*[Symbol.iterator](): Iterator<{ node: VDOMNode; parent: VDOMNode }> {
for (const node of this.roots) {
yield* this.iterateVDOM(node);
yield* this.iterateVDOM(node, undefined);
}
}
private *iterateVDOM(node: VDOMNode): Generator<VDOMNode> {
yield node;
private *iterateVDOM(node: VDOMNode, parent: VDOMNode): Generator<{ node: VDOMNode; parent: VDOMNode }> {
yield { node, parent };
if (node.children) {
for (const child of node.children) {
yield* this.iterateVDOM(child);
yield* this.iterateVDOM(child, node);
}

@@ -49,11 +49,18 @@ }

let renderToken = new CancellationToken();
sessionToken.chain(renderToken);
sessionToken.addCancelable(() => {
if (renderToken) {
renderToken.cancel();
}
});
root.onChange.subscribe(() => {
renderToken.cancel();
renderToken = new CancellationToken();
sessionToken.chain(renderToken);
DataSource.fromEvent(root.onChange, sessionToken).transform(
dsMicroDebounce(),
dsTap(() => {
renderToken.cancel();
renderToken = new CancellationToken();
root.roots = aurumToVDOMInternal(content, renderToken, root.onChange);
}, sessionToken);
root.roots = aurumToVDOMInternal(content, renderToken, root.onChange);
}),
sessionToken
);

@@ -60,0 +67,0 @@ root.roots = aurumToVDOMInternal(content, renderToken, root.onChange);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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