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

@im-js/core

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@im-js/core - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

38

functions/throttle-map.d.ts
/**
* `throttleMap` 반환 함수
*/
interface ThrottleMapFunction<T extends string, V> {
/**
* 즉시 실행
* @param dataset
*/
(dataset: Record<T, V>): void;
/**
* 지연 병합 실행
* @param key
* @param value
*/
(key: T, value: V): void;
}
/**
* `throttleMap` 지연 실행 함수
*/
interface ThrottleCallback<T extends string, V> {
(dataset: Record<T, V>): void;
}
/**
* 인자를 객체로 병합 후 일정 시간 후 실행
*
* @example
* ```js
* const delayedLog = throttleMap(dataset => {
* console.log(dataset)
* });
* // `{foo: 1, bar: 2}` 0.24초 지연 실행
* delayedLog('foo', 1);
* delayedLog('bar', 2);
* // `{baz: 3}` 즉시 실행
* delayedLog({baz: 3});
* ```
* @param callback
* @param time
*/
export declare function throttleMap<T extends string = string, V = any>(callback: (dataset: Partial<Record<T, V>>) => void, time?: number): (key: T, value: V) => void;
export declare function throttleMap<T extends string = string, V = any>(callback: ThrottleCallback<T, V>, time?: number): ThrottleMapFunction<T, V>;
export {};

2

package.json
{
"name": "@im-js/core",
"version": "1.3.0",
"version": "1.3.1",
"description": "Present by IMR",

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

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