@tempots/dom 30.1.0 → 31.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.js +315 -278
- package/package.json +1 -1
- package/std/value.d.ts +24 -0
package/package.json
CHANGED
package/std/value.d.ts
CHANGED
|
@@ -71,6 +71,30 @@ export declare const Value: {
|
|
|
71
71
|
autoDisposeProp?: boolean;
|
|
72
72
|
equals?: (a: T, b: T) => boolean;
|
|
73
73
|
}) => Prop<T>;
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new signal that emits `true` if the value is truthy, `false` otherwise.
|
|
76
|
+
* @param value - The value or signal to check.
|
|
77
|
+
* @returns A signal that emits `true` if the value is truthy, `false` otherwise.
|
|
78
|
+
*/
|
|
79
|
+
truthy: <T>(value: Value<T>) => Value<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
|
|
82
|
+
* @param value - The value or signal to check.
|
|
83
|
+
* @returns A signal that emits `true` if the value is falsy, `false` otherwise.
|
|
84
|
+
*/
|
|
85
|
+
falsy: <T>(value: Value<T>) => Value<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
88
|
+
* @param value - The value or signal to check.
|
|
89
|
+
* @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
90
|
+
*/
|
|
91
|
+
nil: <T>(value: Value<T>) => Value<boolean>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
94
|
+
* @param value - The value or signal to check.
|
|
95
|
+
* @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
96
|
+
*/
|
|
97
|
+
defined: <T>(value: Value<T>) => Value<boolean>;
|
|
74
98
|
};
|
|
75
99
|
/**
|
|
76
100
|
* Creates a computed signal that depends on other signals or literal values and updates when any of the dependencies change.
|