New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tldraw/state

Package Overview
Dependencies
Maintainers
4
Versions
1957
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tldraw/state - npm Package Compare versions

Comparing version

to
3.10.0-canary.075415a2bbc8

2

dist-cjs/index.js

@@ -61,5 +61,5 @@ "use strict";

"@tldraw/state",
"3.9.0",
"3.10.0-canary.075415a2bbc8",
"cjs"
);
//# sourceMappingURL=index.js.map

@@ -125,2 +125,16 @@ "use strict";

}
*[Symbol.iterator]() {
if (this.array) {
for (let i = 0; i < this.arraySize; i++) {
const elem = this.array[i];
if (typeof elem !== "undefined") {
yield elem;
}
}
} else if (this.set) {
yield* this.set;
} else {
throw new Error("no set or array");
}
}
has(elem) {

@@ -127,0 +141,0 @@ if (this.array) {

@@ -25,2 +25,3 @@ "use strict";

equals: () => equals,
hasReactors: () => hasReactors,
haveParentsChanged: () => haveParentsChanged,

@@ -73,2 +74,10 @@ singleton: () => singleton

const EMPTY_ARRAY = singleton("empty_array", () => Object.freeze([]));
function hasReactors(signal) {
for (const child of signal.children) {
if (child.isActivelyListening) {
return true;
}
}
return false;
}
//# sourceMappingURL=helpers.js.map
{
"name": "@tldraw/state",
"description": "A tiny little drawing app (state).",
"version": "3.9.0",
"version": "3.10.0-canary.075415a2bbc8",
"author": {

@@ -58,3 +58,3 @@ "name": "tldraw Inc.",

"dependencies": {
"@tldraw/utils": "3.9.0"
"@tldraw/utils": "3.10.0-canary.075415a2bbc8"
},

@@ -61,0 +61,0 @@ "typedoc": {

@@ -25,2 +25,2 @@ # @tldraw/state

Have questions, comments or feedback? [Join our discord](https://discord.tldraw.com/?utm_source=github&utm_medium=social&utm_campaign=sociallink). For the latest news and release notes, visit [tldraw.dev](https://tldraw.dev).
Have questions, comments or feedback? [Join our discord](https://discord.tldraw.com/?utm_source=github&utm_medium=readme&utm_campaign=sociallink). For the latest news and release notes, visit [tldraw.dev](https://tldraw.dev).

@@ -148,2 +148,18 @@ // The maximum size for an array in an ArraySet

*[Symbol.iterator]() {
if (this.array) {
for (let i = 0; i < this.arraySize; i++) {
const elem = this.array[i]
if (typeof elem !== 'undefined') {
yield elem
}
}
} else if (this.set) {
yield* this.set
} else {
throw new Error('no set or array')
}
}
has(elem: T) {

@@ -150,0 +166,0 @@ if (this.array) {

@@ -98,1 +98,15 @@ import { Child, Signal } from './types'

export const EMPTY_ARRAY: [] = singleton('empty_array', () => Object.freeze([]) as any)
/**
* Does this signal have any active reactors attached to it? When it changes, will it cause anything to run?
* @public
*/
export function hasReactors(signal: Signal<any>) {
for (const child of signal.children) {
if (child.isActivelyListening) {
return true
}
}
return false
}

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

Sorry, the diff of this file is not supported yet