@solid-primitives/utils
Advanced tools
Comparing version
@@ -256,4 +256,4 @@ import { Accessor, Setter, onCleanup } from 'solid-js'; | ||
*/ | ||
declare function handleDiffArray<T>(current: T[], prev: T[], handleAdded: (item: T) => void, handleRemoved: (item: T) => void): void; | ||
declare function handleDiffArray<T>(current: readonly T[], prev: readonly T[], handleAdded: (item: T) => void, handleRemoved: (item: T) => void): void; | ||
export { AccessReturnTypes, AnyClass, AnyFunction, AnyObject, AnyStatic, DeepPartialAny, Definite, Directive, ExtractIfPossible, Falsy, FalsyValue, ItemsOf, ItemsOfMany, Many, MaybeAccessor, MaybeAccessorValue, Modify, ModifyDeep, Mutable, NonIterable, Noop, OnAccessEffectFunction, Position, PrimitiveValue, RequiredKeys, SetterValue, Simplify, StaticStoreSetter, Tail, Trigger, TriggerCache, Truthy, UnboxLazy, UnionToIntersection, Values, WeakTriggerCache, access, accessArray, accessWith, arrayEquals, asAccessor, asArray, chain, clamp, compare, createCallbackStack, createMicrotask, createProxy, createStaticStore, createTrigger, createTriggerCache, createWeakTriggerCache, entries, forEachEntry, handleDiffArray, isClient, isDev, isObject, isProd, isServer, keys, noop, ofClass, onRootCleanup, warn, withAccess }; |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
// src/index.ts | ||
@@ -45,5 +47,3 @@ import { | ||
function forEachEntry(object, iterator) { | ||
Object.entries(object).forEach( | ||
([key, item], index, pairs) => iterator(key, item, index, pairs, object) | ||
); | ||
Object.entries(object).forEach(([key, item], index, pairs) => iterator(key, item, index, pairs, object)); | ||
} | ||
@@ -74,13 +74,10 @@ var entries = Object.entries; | ||
function createProxy(traps) { | ||
return new Proxy( | ||
{}, | ||
{ | ||
get: (_, k) => traps.get(k), | ||
set: (_, k, v) => { | ||
var _a; | ||
(_a = traps.set) == null ? void 0 : _a.call(traps, k, v); | ||
return false; | ||
} | ||
return new Proxy({}, { | ||
get: (_, k) => traps.get(k), | ||
set: (_, k, v) => { | ||
var _a; | ||
(_a = traps.set) == null ? void 0 : _a.call(traps, k, v); | ||
return false; | ||
} | ||
); | ||
}); | ||
} | ||
@@ -87,0 +84,0 @@ var createTrigger = isDev ? () => createSignal(void 0, { equals: false, name: "trigger" }) : () => createSignal(void 0, { equals: false }); |
{ | ||
"name": "@solid-primitives/utils", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A bunch of reactive utility types and functions, for building primitives with Solid.js", | ||
@@ -24,2 +24,7 @@ "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>", | ||
], | ||
"scripts": { | ||
"build": "tsup", | ||
"test": "uvu -r solid-register", | ||
"test:watch": "watchlist src test -- npm test" | ||
}, | ||
"keywords": [ | ||
@@ -32,7 +37,7 @@ "utilities", | ||
"devDependencies": { | ||
"jsdom": "^19.0.0", | ||
"jsdom": "^20.0.0", | ||
"prettier": "^2.7.1", | ||
"solid-register": "^0.2.5", | ||
"tslib": "^2.4.0", | ||
"tsup": "^6.1.3", | ||
"tsup": "^6.2.1", | ||
"uvu": "^0.5.6", | ||
@@ -43,8 +48,3 @@ "watchlist": "^0.3.1" | ||
"solid-js": "^1.4.1" | ||
}, | ||
"scripts": { | ||
"build": "tsup", | ||
"test": "uvu -r solid-register", | ||
"test:watch": "watchlist src test -- npm test" | ||
} | ||
} | ||
} |
@@ -0,0 +0,0 @@ <p> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26879
0.02%739
-1.2%