@onivoro/isomorphic-common 0.0.6 → 0.0.8
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 +1 -1
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/lib/functions/from-calendar-date.function.d.ts +2 -0
- package/src/lib/functions/from-calendar-date.function.js +6 -0
- package/src/lib/functions/from-calendar-date.function.js.map +1 -0
- package/src/lib/functions/to-calendar-date.function.d.ts +1 -0
- package/src/lib/functions/to-calendar-date.function.js +13 -0
- package/src/lib/functions/to-calendar-date.function.js.map +1 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -5,12 +5,14 @@ export * from './lib/functions/add-offset.function';
|
|
|
5
5
|
export * from './lib/functions/camel-case.function';
|
|
6
6
|
export * from './lib/functions/convert-object-to-literal.function';
|
|
7
7
|
export * from './lib/functions/from-boolean-string.function';
|
|
8
|
+
export * from './lib/functions/from-calendar-date.function';
|
|
8
9
|
export * from './lib/functions/from-csv-string.function';
|
|
9
10
|
export * from './lib/functions/parse-bool.function';
|
|
10
11
|
export * from './lib/functions/sanitize-filename.function';
|
|
11
12
|
export * from './lib/functions/snake-case.function';
|
|
12
13
|
export * from './lib/functions/subtract-offset.function';
|
|
13
14
|
export * from './lib/functions/to-boolean-string.function';
|
|
15
|
+
export * from './lib/functions/to-calendar-date.function';
|
|
14
16
|
export * from './lib/functions/to-csv-string.function';
|
|
15
17
|
export * from './lib/functions/to-locale-date-string.function';
|
|
16
18
|
export * from './lib/functions/to-locale-time-string.function';
|
package/src/index.js
CHANGED
|
@@ -8,12 +8,14 @@ tslib_1.__exportStar(require("./lib/functions/add-offset.function"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./lib/functions/camel-case.function"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./lib/functions/convert-object-to-literal.function"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./lib/functions/from-boolean-string.function"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./lib/functions/from-calendar-date.function"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./lib/functions/from-csv-string.function"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./lib/functions/parse-bool.function"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./lib/functions/sanitize-filename.function"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./lib/functions/snake-case.function"), exports);
|
|
15
16
|
tslib_1.__exportStar(require("./lib/functions/subtract-offset.function"), exports);
|
|
16
17
|
tslib_1.__exportStar(require("./lib/functions/to-boolean-string.function"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./lib/functions/to-calendar-date.function"), exports);
|
|
17
19
|
tslib_1.__exportStar(require("./lib/functions/to-csv-string.function"), exports);
|
|
18
20
|
tslib_1.__exportStar(require("./lib/functions/to-locale-date-string.function"), exports);
|
|
19
21
|
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,sFAA4D;AAC5D,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,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fromCalendarDate = void 0;
|
|
4
|
+
const add_offset_function_1 = require("./add-offset.function");
|
|
5
|
+
exports.fromCalendarDate = add_offset_function_1.addOffset;
|
|
6
|
+
//# sourceMappingURL=from-calendar-date.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-calendar-date.function.js","sourceRoot":"","sources":["../../../../../../libs/isomorphic-common/src/lib/functions/from-calendar-date.function.ts"],"names":[],"mappings":";;;AAAA,+DAAkD;AAErC,QAAA,gBAAgB,GAAG,+BAAS,CAAC"}
|
|
@@ -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"}
|