summaryrefslogtreecommitdiff
path: root/src/duration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/duration.ts')
-rw-r--r--src/duration.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/duration.ts b/src/duration.ts
index e8dc7d1..ad19921 100644
--- a/src/duration.ts
+++ b/src/duration.ts
@@ -154,26 +154,3 @@ export const parse = (duration: string): E.Either<string, Duration> => {
E.map(build),
);
};
-
-export const transformDurations = (obj: any): E.Either<string, any> => {
- const transform = (o: any): E.Either<string, any> => {
- const entries = Object.entries(o);
-
- for (let [key, value] of entries) {
- if (key === "duration" && typeof value === "string") {
- return parse(value);
- } else if (typeof value === "object" && value !== null) {
- const result = transform(value);
- if (E.isLeft(result)) {
- return result;
- } else {
- o[key] = result.right;
- }
- }
- }
-
- return E.right(o);
- };
-
- return transform(obj);
-}