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

@solid-primitives/utils

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/utils - npm Package Compare versions

Comparing version 0.0.250 to 0.0.255

11

dist/index.d.ts

@@ -5,2 +5,4 @@ import { Accessor } from 'solid-js';

declare type Many<T> = T | T[];
declare type Keys<O extends Object> = keyof O;
declare type Values<O extends Object> = O[Keys<O>];
/**

@@ -16,4 +18,11 @@ * Infers the element type of an array

declare const withAccess: <T, A extends MaybeAccessor<T>, V = MaybeAccessorValue<A>>(value: A, fn: (value: NonNullable<V>) => void) => void;
declare const forEach: <A extends unknown, V = MaybeAccessorValue<A>>(array: A, iterator: (item: V extends any[] ? ItemsOf<V> : V, index: number, array: V extends any[] ? V : V[]) => void) => void;
declare const entries: <A extends MaybeAccessor<Object>, V = MaybeAccessorValue<A>>(object: A) => [string, Values<V>][];
declare const promiseTimeout: (ms: number, throwOnTimeout?: boolean, reason?: string) => Promise<void>;
declare const objectOmit: <T extends Object, K extends (keyof T)[]>(object: T, ...keys: K) => Omit<T, ItemsOf<K>>;
declare const createCallbackStack: <Arg0 = void, Arg1 = void, Arg2 = void, Arg3 = void>() => {
push: (...callbacks: Fn[]) => void;
execute: (arg0: Arg0, arg1: Arg1, arg2: Arg2, arg3: Arg3) => void;
clear: Fn;
};
declare const stringConcat: (...a: MaybeAccessor<any>[]) => string;

@@ -25,2 +34,2 @@ declare const concat: <A extends any[], V = MaybeAccessorValue<ItemsOf<A>>>(...a: A) => (V extends any[] ? ItemsOf<V> : V)[];

export { Fn, ItemsOf, Many, MaybeAccessor, MaybeAccessorValue, access, accessAsArray, concat, isClient, objectOmit, promiseTimeout, stringConcat, toArray, toFloat, toInt, withAccess };
export { Fn, ItemsOf, Keys, Many, MaybeAccessor, MaybeAccessorValue, Values, access, accessAsArray, concat, createCallbackStack, entries, forEach, isClient, objectOmit, promiseTimeout, stringConcat, toArray, toFloat, toInt, withAccess };

@@ -13,2 +13,4 @@ // src/index.ts

};
var forEach = (array, iterator) => accessAsArray(array).forEach(iterator);
var entries = (object) => Object.entries(access(object));
var promiseTimeout = (ms, throwOnTimeout = false, reason = "Timeout") => new Promise((resolve, reject) => throwOnTimeout ? setTimeout(() => reject(reason), ms) : setTimeout(resolve, ms));

@@ -22,2 +24,14 @@ var objectOmit = (object, ...keys) => {

};
var createCallbackStack = () => {
let stack = [];
const clear = () => stack = [];
return {
push: (...callbacks) => stack.push(...callbacks),
execute: (arg0, arg1, arg2, arg3) => {
stack.forEach((cb) => cb(arg0, arg1, arg2, arg3));
clear();
},
clear
};
};
var stringConcat = (...a) => a.reduce((t, c) => t + access(c), "");

@@ -35,2 +49,5 @@ var concat = (...a) => a.reduce((t, c) => {

concat,
createCallbackStack,
entries,
forEach,
isClient,

@@ -37,0 +54,0 @@ objectOmit,

2

package.json
{
"name": "@solid-primitives/utils",
"version": "0.0.250",
"version": "0.0.255",
"description": "A bunch of reactive utility types and functions, for building primitives with Solid.js",

@@ -5,0 +5,0 @@ "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>",

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