@solid-primitives/utils 5.5.1 → 5.5.2
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/dist/index.cjs +2 -5
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,8 @@ exports.noop = () => void 0;
|
|
|
8
8
|
exports.trueFn = () => true;
|
|
9
9
|
exports.falseFn = () => false;
|
|
10
10
|
exports.isClient = !web.isServer;
|
|
11
|
-
exports.
|
|
11
|
+
exports.isDev = exports.isClient && !!solidJs.DEV;
|
|
12
|
+
exports.isProd = !exports.isDev;
|
|
12
13
|
exports.ofClass = (v, c) => v instanceof c || v && v.constructor === c;
|
|
13
14
|
function isObject(value) {
|
|
14
15
|
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
@@ -180,10 +181,6 @@ function handleDiffArray(current, prev, handleAdded, handleRemoved) {
|
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
Object.defineProperty(exports, 'isDev', {
|
|
184
|
-
enumerable: true,
|
|
185
|
-
get: function () { return web.isDev; }
|
|
186
|
-
});
|
|
187
184
|
Object.defineProperty(exports, 'isServer', {
|
|
188
185
|
enumerable: true,
|
|
189
186
|
get: function () { return web.isServer; }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accessor, Setter, AccessorArray, NoInfer, EffectFunction, onCleanup, SignalOptions, createSignal } from 'solid-js';
|
|
2
|
-
export {
|
|
2
|
+
export { isServer } from 'solid-js/web';
|
|
3
3
|
export { EffectOptions, OnOptions, ResolvedChildren, ResolvedJSXElement } from 'solid-js/types/reactive/signal';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -90,6 +90,7 @@ declare const trueFn: () => boolean;
|
|
|
90
90
|
declare const falseFn: () => boolean;
|
|
91
91
|
|
|
92
92
|
declare const isClient: boolean;
|
|
93
|
+
declare const isDev: boolean;
|
|
93
94
|
declare const isProd: boolean;
|
|
94
95
|
/**
|
|
95
96
|
* Check if the value is an instance of ___
|
|
@@ -221,4 +222,4 @@ declare function createHydratableStaticStore<T extends Readonly<AnyStatic>>(serv
|
|
|
221
222
|
*/
|
|
222
223
|
declare function handleDiffArray<T>(current: readonly T[], prev: readonly T[], handleAdded: (item: T) => void, handleRemoved: (item: T) => void): void;
|
|
223
224
|
|
|
224
|
-
export { AccessReturnTypes, AnyClass, AnyFunction, AnyObject, AnyStatic, DeepPartialAny, Directive, ExtractIfPossible, Falsy, FalsyValue, ItemsOf, ItemsOfMany, Many, MaybeAccessor, MaybeAccessorValue, Modify, ModifyDeep, Narrow, NonIterable, Noop, OnAccessEffectFunction, Position, PrimitiveValue, RequiredKeys, SetterParam, Simplify, StaticStoreSetter, Tail, Truthy, UnboxLazy, UnionToIntersection, Values, access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient, isObject, isProd, keys, noop, ofClass, reverseChain, trueFn, tryOnCleanup, withAccess };
|
|
225
|
+
export { AccessReturnTypes, AnyClass, AnyFunction, AnyObject, AnyStatic, DeepPartialAny, Directive, ExtractIfPossible, Falsy, FalsyValue, ItemsOf, ItemsOfMany, Many, MaybeAccessor, MaybeAccessorValue, Modify, ModifyDeep, Narrow, NonIterable, Noop, OnAccessEffectFunction, Position, PrimitiveValue, RequiredKeys, SetterParam, Simplify, StaticStoreSetter, Tail, Truthy, UnboxLazy, UnionToIntersection, Values, access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient, isDev, isObject, isProd, keys, noop, ofClass, reverseChain, trueFn, tryOnCleanup, withAccess };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { untrack, getOwner, onCleanup, createSignal, sharedConfig, onMount, batch } from 'solid-js';
|
|
2
|
-
import { isServer
|
|
3
|
-
export {
|
|
1
|
+
import { DEV, untrack, getOwner, onCleanup, createSignal, sharedConfig, onMount, batch } from 'solid-js';
|
|
2
|
+
import { isServer } from 'solid-js/web';
|
|
3
|
+
export { isServer } from 'solid-js/web';
|
|
4
4
|
|
|
5
5
|
// src/index.ts
|
|
6
6
|
var noop = () => void 0;
|
|
7
7
|
var trueFn = () => true;
|
|
8
8
|
var falseFn = () => false;
|
|
9
9
|
var isClient = !isServer;
|
|
10
|
+
var isDev = isClient && !!DEV;
|
|
10
11
|
var isProd = !isDev;
|
|
11
12
|
var ofClass = (v, c) => v instanceof c || v && v.constructor === c;
|
|
12
13
|
function isObject(value) {
|
|
@@ -179,4 +180,4 @@ function handleDiffArray(current, prev, handleAdded, handleRemoved) {
|
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
export { access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient, isObject, isProd, keys, noop, ofClass, reverseChain, trueFn, tryOnCleanup, withAccess };
|
|
183
|
+
export { access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createHydratableSignal, createHydratableStaticStore, createHydrateSignal, createMicrotask, createStaticStore, defer, entries, falseFn, handleDiffArray, isClient, isDev, isObject, isProd, keys, noop, ofClass, reverseChain, trueFn, tryOnCleanup, withAccess };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid-primitives/utils",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "A bunch of reactive utility types and functions, for building primitives with Solid.js",
|
|
5
5
|
"author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>",
|
|
6
6
|
"contributors": [
|