0.13.4 • Published 5 months ago
@krainovsd/js-helpers v0.13.4
@krainovsd/js-helpers
The library of helpers for JS in Browser and NodeJS environments.
Installing
Using pnpm:
pnpm install @krainovsd/js-helpers
Monorepo
Using in frontend app with monorepo make sure that node-fetch will be excluded from bundle.
export default defineConfig({
base: "/",
plugins: [
react(),
],
build: {
rollupOptions: {
external: ["node-fetch"],
},
},
});
Usage
import { limitStreamOfRequests } from "@krainovsd/js-helpers"
limitStreamOfRequests({
countRequests: 100,
maxCountInParallel: 5,
promiseGetter: () => {
return api.requestApi();
},
collectResult: false,
refetchAfterError: true,
maxTryCount: 3,
});
for NodeJS
const { createRequestClientInstance } = require("@krainovsd/js-helpers")
createRequestClientInstance().requestApi({ method: "DELETE", path: "/entity/:id" });
0.13.4
5 months ago
0.13.3
5 months ago
0.13.2
6 months ago
0.13.1
6 months ago
0.13.0
7 months ago
0.12.0
7 months ago
0.11.0
8 months ago
0.10.6
8 months ago
0.10.5
8 months ago
0.10.4
8 months ago
0.10.3
8 months ago
0.10.2
8 months ago
0.10.1
8 months ago
0.10.0
8 months ago
0.9.0
8 months ago
0.8.1
8 months ago
0.8.0
8 months ago
0.7.2
8 months ago
0.7.1
9 months ago
0.7.0
9 months ago
0.6.2
9 months ago
0.6.1
9 months ago
0.6.0
9 months ago
0.5.0
9 months ago
0.4.1
9 months ago
0.4.0
9 months ago
0.3.4
9 months ago
0.3.3
9 months ago
0.3.2
10 months ago
0.3.1
10 months ago
0.3.0
10 months ago
0.2.2
10 months ago