@onivoro/isomorphic-common 0.0.6 → 0.0.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onivoro/isomorphic-common",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "main": "./src/index.js",
5
5
  "type": "commonjs"
6
6
  }
package/src/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './lib/functions/sanitize-filename.function';
11
11
  export * from './lib/functions/snake-case.function';
12
12
  export * from './lib/functions/subtract-offset.function';
13
13
  export * from './lib/functions/to-boolean-string.function';
14
+ export * from './lib/functions/to-calendar-date.function';
14
15
  export * from './lib/functions/to-csv-string.function';
15
16
  export * from './lib/functions/to-locale-date-string.function';
16
17
  export * from './lib/functions/to-locale-time-string.function';
package/src/index.js CHANGED
@@ -14,6 +14,7 @@ tslib_1.__exportStar(require("./lib/functions/sanitize-filename.function"), expo
14
14
  tslib_1.__exportStar(require("./lib/functions/snake-case.function"), exports);
15
15
  tslib_1.__exportStar(require("./lib/functions/subtract-offset.function"), exports);
16
16
  tslib_1.__exportStar(require("./lib/functions/to-boolean-string.function"), exports);
17
+ tslib_1.__exportStar(require("./lib/functions/to-calendar-date.function"), exports);
17
18
  tslib_1.__exportStar(require("./lib/functions/to-csv-string.function"), exports);
18
19
  tslib_1.__exportStar(require("./lib/functions/to-locale-date-string.function"), exports);
19
20
  tslib_1.__exportStar(require("./lib/functions/to-locale-time-string.function"), exports);
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/isomorphic-common/src/index.ts"],"names":[],"mappings":";;;AAAA,kFAAwD;AACxD,mFAAyD;AACzD,qFAA2D;AAE3D,8EAAoD;AACpD,8EAAoD;AACpD,6FAAmE;AACnE,uFAA6D;AAC7D,mFAAyD;AACzD,8EAAoD;AACpD,qFAA2D;AAC3D,8EAAoD;AACpD,mFAAyD;AACzD,qFAA2D;AAC3D,iFAAuD;AACvD,yFAA+D;AAC/D,yFAA+D;AAC/D,mFAAyD;AACzD,kFAAwD;AACxD,8EAAoD;AACpD,+EAAqD;AACrD,yEAA+C;AAE/C,qFAA2D"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/isomorphic-common/src/index.ts"],"names":[],"mappings":";;;AAAA,kFAAwD;AACxD,mFAAyD;AACzD,qFAA2D;AAE3D,8EAAoD;AACpD,8EAAoD;AACpD,6FAAmE;AACnE,uFAA6D;AAC7D,mFAAyD;AACzD,8EAAoD;AACpD,qFAA2D;AAC3D,8EAAoD;AACpD,mFAAyD;AACzD,qFAA2D;AAC3D,oFAA0D;AAC1D,iFAAuD;AACvD,yFAA+D;AAC/D,yFAA+D;AAC/D,mFAAyD;AACzD,kFAAwD;AACxD,8EAAoD;AACpD,+EAAqD;AACrD,yEAA+C;AAE/C,qFAA2D"}
@@ -0,0 +1 @@
1
+ export declare function toCalendarDate(input: string | Date | undefined | null): string | undefined;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toCalendarDate = void 0;
4
+ const subtract_offset_function_1 = require("./subtract-offset.function");
5
+ function toCalendarDate(input) {
6
+ const parsed = (0, subtract_offset_function_1.subtractOffset)(input);
7
+ if (!parsed) {
8
+ return;
9
+ }
10
+ return parsed?.toISOString().split('T')[0];
11
+ }
12
+ exports.toCalendarDate = toCalendarDate;
13
+ //# sourceMappingURL=to-calendar-date.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-calendar-date.function.js","sourceRoot":"","sources":["../../../../../../libs/isomorphic-common/src/lib/functions/to-calendar-date.function.ts"],"names":[],"mappings":";;;AAAA,yEAA4D;AAE5D,SAAgB,cAAc,CAAC,KAAuC;IAClE,MAAM,MAAM,GAAG,IAAA,yCAAc,EAAC,KAAK,CAAC,CAAC;IAErC,IAAI,CAAC,MAAM,EAAE;QACT,OAAO;KACV;IAED,OAAO,MAAM,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AARD,wCAQC"}