0.13.4 • Published 10 months ago

@krainovsd/js-helpers v0.13.4

Weekly downloads
-
License
ISC
Repository
github
Last release
10 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

10 months ago

0.13.3

10 months ago

0.13.2

11 months ago

0.13.1

11 months ago

0.13.0

12 months ago

0.12.0

1 year ago

0.11.0

1 year ago

0.10.6

1 year ago

0.10.5

1 year ago

0.10.4

1 year ago

0.10.3

1 year ago

0.10.2

1 year ago

0.10.1

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.2

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.4

1 year ago

0.3.3

1 year 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