lenix 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,6 @@
1
+ /**
2
+ * @param domain - domain of the URL (e.g. api.github.com)
3
+ * @param endpoint - endpoint of the URL (e.g. /users/lenixdev)
4
+ * @param request - request options (e.g. { method: 'GET' })
5
+ */
1
6
  export declare const safeRequest: (domain: string, endpoint: string, request: RequestInit) => Promise<Response>;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @param domain - domain of the URL (e.g. api.github.com)
3
+ * @param endpoint - endpoint of the URL (e.g. /users/lenixdev)
4
+ * @param request - request options (e.g. { method: 'GET' })
5
+ */
1
6
  export const safeRequest = async (domain, endpoint, request) => {
2
7
  try {
3
8
  return await fetch(`https://${domain}/${endpoint}`, request);
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { wait } from './wait';
2
+ export { safeRequest } from './fetch';
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export { wait } from './wait';
2
+ export { safeRequest } from './fetch';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lenix",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Helpful modules for the software engineers",
5
5
  "author": "Lenix",
6
6
  "license": "GPL-3.0",