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

@furystack/utils

Package Overview
Dependencies
Maintainers
0
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@furystack/utils - npm Package Compare versions

Comparing version 8.0.1 to 8.0.2

4

esm/debounce.js

@@ -14,3 +14,5 @@ /**

method(...args);
timeout ?? clearTimeout(timeout);
if (timeout) {
clearTimeout(timeout);
}
timeout = undefined;

@@ -17,0 +19,0 @@ }, debounceMs);

/**
* Tests for debounce
*/
export declare const debounceTests: import("vitest").SuiteCollector<{}>;
export declare const debounceTests: import("vitest").SuiteCollector<object>;
//# sourceMappingURL=debounce.spec.d.ts.map

@@ -1,3 +0,3 @@

type ListenerFunction<EventTypeMap extends Object, T extends keyof EventTypeMap> = (arg: EventTypeMap[T]) => void;
export declare class EventHub<EventTypeMap extends Object> implements Disposable {
type ListenerFunction<EventTypeMap extends object, T extends keyof EventTypeMap> = (arg: EventTypeMap[T]) => void;
export declare class EventHub<EventTypeMap extends object> implements Disposable {
private listeners;

@@ -4,0 +4,0 @@ addListener<TEvent extends keyof EventTypeMap>(event: TEvent, listener: ListenerFunction<EventTypeMap, TEvent>): void;

/**
* Observable Value tests
*/
export declare const observableTests: import("vitest").SuiteCollector<{}>;
export declare const observableTests: import("vitest").SuiteCollector<object>;
//# sourceMappingURL=observable-value.spec.d.ts.map
/**
* Path Helper tests
*/
export declare const pathHelperTests: import("vitest").SuiteCollector<{}>;
export declare const pathHelperTests: import("vitest").SuiteCollector<object>;
//# sourceMappingURL=path-helper.spec.d.ts.map
/**
* Tests for async sleep
*/
export declare const sleepAsyncTests: import("vitest").SuiteCollector<{}>;
export declare const sleepAsyncTests: import("vitest").SuiteCollector<object>;
//# sourceMappingURL=sleep-async.spec.d.ts.map

@@ -13,4 +13,5 @@ export const compareBy = (entity1, entity2, field, direction) => {

Array.prototype.sortBy = function (key, direction = 'asc') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this.sort((a, b) => compareBy(a, b, key, direction));
};
//# sourceMappingURL=sort-by.js.map

@@ -12,3 +12,3 @@ import { describe, expect, it, vi } from 'vitest';

this.disposed = true;
this.disposeCallback && this.disposeCallback();
this.disposeCallback?.();
}

@@ -15,0 +15,0 @@ /**

@@ -11,3 +11,3 @@ import { describe, expect, it, vi } from 'vitest';

this.disposed = true;
this.disposeCallback && this.disposeCallback();
this.disposeCallback?.();
}

@@ -14,0 +14,0 @@ /**

{
"name": "@furystack/utils",
"version": "8.0.1",
"version": "8.0.2",
"description": "General utilities",

@@ -37,5 +37,5 @@ "type": "module",

"devDependencies": {
"typescript": "^5.5.3",
"vitest": "^2.0.3"
"typescript": "^5.5.4",
"vitest": "^2.0.5"
}
}

@@ -14,3 +14,5 @@ /**

method(...args)
timeout ?? clearTimeout(timeout)
if (timeout) {
clearTimeout(timeout)
}
timeout = undefined

@@ -17,0 +19,0 @@ }, debounceMs)

@@ -15,3 +15,3 @@ import { describe, expect, it } from 'vitest'

it('Should skip falsy sources', () => {
expect(deepMerge({ a: 1, b: 0, c: 0 }, null as any as {}, { b: 2 }, { c: 3 })).toEqual({ a: 1, b: 2, c: 3 })
expect(deepMerge({ a: 1, b: 0, c: 0 }, null as any as object, { b: 2 }, { c: 3 })).toEqual({ a: 1, b: 2, c: 3 })
})

@@ -18,0 +18,0 @@

@@ -1,4 +0,4 @@

type ListenerFunction<EventTypeMap extends Object, T extends keyof EventTypeMap> = (arg: EventTypeMap[T]) => void
type ListenerFunction<EventTypeMap extends object, T extends keyof EventTypeMap> = (arg: EventTypeMap[T]) => void
export class EventHub<EventTypeMap extends Object> implements Disposable {
export class EventHub<EventTypeMap extends object> implements Disposable {
private listeners = new Map<keyof EventTypeMap, Set<ListenerFunction<EventTypeMap, keyof EventTypeMap>>>()

@@ -5,0 +5,0 @@

@@ -26,3 +26,4 @@ declare global {

Array.prototype.sortBy = function (key, direction = 'asc') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this.sort((a, b) => compareBy(a, b, key, direction))
}

@@ -13,3 +13,3 @@ import { describe, expect, it, vi } from 'vitest'

this.disposed = true
this.disposeCallback && this.disposeCallback()
this.disposeCallback?.()
}

@@ -16,0 +16,0 @@

@@ -12,3 +12,3 @@ import { describe, expect, it, vi } from 'vitest'

this.disposed = true
this.disposeCallback && this.disposeCallback()
this.disposeCallback?.()
}

@@ -15,0 +15,0 @@

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

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

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