@react-pakistan/util-functions 1.23.84 → 1.23.86

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.
@@ -0,0 +1,6 @@
1
+ interface Params {
2
+ isoString: string;
3
+ hour12: boolean;
4
+ }
5
+ export declare const formatTime: ({ isoString, hour12, }: Params) => string;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatTime = void 0;
4
+ var formatTime = function (_a) {
5
+ var isoString = _a.isoString, hour12 = _a.hour12;
6
+ var date = new Date(isoString);
7
+ return date.toLocaleTimeString([], {
8
+ hour: '2-digit',
9
+ minute: '2-digit',
10
+ hour12: hour12,
11
+ });
12
+ };
13
+ exports.formatTime = formatTime;
@@ -12,7 +12,7 @@ interface Return {
12
12
  data: any;
13
13
  error: any;
14
14
  loading: boolean;
15
- fetchNow: (url: string, config: FetchConfig) => void;
15
+ fetchNow: (url?: string, config?: FetchConfig) => void;
16
16
  }
17
17
  export declare const useFetch: (url: string, config?: FetchConfig) => Return;
18
18
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.23.84",
3
+ "version": "1.23.86",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {