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

@yornaath/batshit

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yornaath/batshit - npm Package Compare versions

Comparing version 0.0.3 to 0.2.0

dist/devtools.d.ts

12

dist/index.d.ts

@@ -25,3 +25,3 @@ /**

*/
export type BatcherConfig<T, Q> = {
export type BatcherConfig<T, Q, R = T> = {
/**

@@ -45,3 +45,7 @@ * The function that makes the batched request for the current batch queries

*/
equality: keyof T | ((item: T, query: Q) => boolean);
resolver: (items: T[], query: Q) => R;
/**
* Display name of the batcher. Used for debugging and devtools.
*/
name?: string;
};

@@ -70,3 +74,3 @@ /**

*/
export declare const create: <T, Q>(config: BatcherConfig<T, Q>) => Batcher<T, Q>;
export declare const create: <T, Q, R = T>(config: BatcherConfig<T, Q, R>) => Batcher<R, Q>;
/**

@@ -78,3 +82,3 @@ * Create a euquality check to check if the query matches a given key on the item data.

*/
export declare const keyEquality: <T, Q>(key: keyof T) => (item: T, query: Q) => boolean;
export declare const keyResolver: <T, Q>(key: keyof T) => (items: T[], query: Q) => T;
/**

@@ -81,0 +85,0 @@ * Give a window in ms where all queued fetched made within the window will be batched into

{
"name": "@yornaath/batshit",
"version": "0.0.3",
"version": "0.2.0",
"description": "A batch manager that will deduplicate and batch requests for a certain data type made within a window.",

@@ -20,2 +20,6 @@ "author": {

"import": "./dist/index.mjs"
},
"./dist/devtools": {
"require": "./dist/devtools.cjs",
"import": "./dist/devtools.mjs"
}

@@ -35,12 +39,3 @@ },

"build": "rm -rf ./dist && rollup -c && tsc"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-typescript": "^10.0.1",
"@vitest/coverage-c8": "^0.26.2",
"rollup": "^3.8.0",
"rollup-plugin-typescript2": "^0.34.1",
"typescript": "^4.9.4",
"vitest": "^0.26.2"
}
}

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