react-restyle-components 0.3.46 → 0.3.47

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,4 +1,4 @@
1
- export * from './src/utility.util';
1
+ export * from './src/utility/utility.util';
2
2
  export * from './src/calculation/calculation.util';
3
3
  export * from './src/convert/numberToWords/numToWords.util';
4
4
  export * from './src/convert/typography/camelCaseToTitleCase.util';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC"}
@@ -1,4 +1,4 @@
1
- export * from './src/utility.util';
1
+ export * from './src/utility/utility.util';
2
2
  export * from './src/calculation/calculation.util';
3
3
  export * from './src/convert/numberToWords/numToWords.util';
4
4
  export * from './src/convert/typography/camelCaseToTitleCase.util';
@@ -1,4 +1,4 @@
1
- export * from './utility.util';
1
+ export * from './utility/utility.util';
2
2
  export * from './calculation/calculation.util';
3
3
  export * from './convert/numberToWords/numToWords.util';
4
4
  export * from './convert/typography/camelCaseToTitleCase.util';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core-utils/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core-utils/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gCAAgC,CAAC"}
@@ -1,4 +1,4 @@
1
- export * from './utility.util';
1
+ export * from './utility/utility.util';
2
2
  export * from './calculation/calculation.util';
3
3
  export * from './convert/numberToWords/numToWords.util';
4
4
  export * from './convert/typography/camelCaseToTitleCase.util';
@@ -0,0 +1,4 @@
1
+ export declare const debounce: any;
2
+ export declare const calculateHoursDifference: (date1: Date, date2: Date) => number;
3
+ export declare const calculateHoursDifferenceDecimal: (date1: Date, date2: Date) => number;
4
+ //# sourceMappingURL=utility.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.util.d.ts","sourceRoot":"","sources":["../../../../../src/core-utils/src/utility/utility.util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,KAEb,CAAC;AAET,eAAO,MAAM,wBAAwB,UAAW,IAAI,SAAS,IAAI,KAAG,MAGnE,CAAC;AAEF,eAAO,MAAM,+BAA+B,UACnC,IAAI,SACJ,IAAI,KACV,MAGF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as _ from 'lodash';
2
+ export const debounce = _.debounce((fun) => {
3
+ fun();
4
+ }, 1000);
5
+ export const calculateHoursDifference = (date1, date2) => {
6
+ const diffInMs = Math.abs(date2.getTime() - date1.getTime());
7
+ return Math.floor(diffInMs / (1000 * 60 * 60));
8
+ };
9
+ export const calculateHoursDifferenceDecimal = (date1, date2) => {
10
+ const diffInMs = Math.abs(date2.getTime() - date1.getTime());
11
+ return diffInMs / (1000 * 60 * 60);
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.3.46",
3
+ "version": "0.3.47",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {
@@ -1,2 +0,0 @@
1
- export declare const debounce: any;
2
- //# sourceMappingURL=utility.util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utility.util.d.ts","sourceRoot":"","sources":["../../../../src/core-utils/src/utility.util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,KAEb,CAAC"}
@@ -1,4 +0,0 @@
1
- import * as _ from 'lodash';
2
- export const debounce = _.debounce((fun) => {
3
- fun();
4
- }, 1000);