0.13.4 • Published 8 months ago

@krainovsd/js-helpers v0.13.4

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

@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

8 months ago

0.13.3

8 months ago

0.13.2

9 months ago

0.13.1

9 months ago

0.13.0

10 months ago

0.12.0

10 months ago

0.11.0

10 months ago

0.10.6

11 months ago

0.10.5

11 months ago

0.10.4

11 months ago

0.10.3

11 months ago

0.10.2

11 months ago

0.10.1

11 months ago

0.10.0

11 months ago

0.9.0

11 months ago

0.8.1

11 months ago

0.8.0

11 months ago

0.7.2

11 months ago

0.7.1

11 months ago

0.7.0

12 months ago

0.6.2

12 months ago

0.6.1

12 months ago

0.6.0

12 months ago

0.5.0

12 months ago

0.4.1

12 months ago

0.4.0

12 months ago

0.3.4

12 months ago

0.3.3

12 months ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.2

1 year ago