From 3bede5be317eb76e293d3a7b44a58e8ee724a27b Mon Sep 17 00:00:00 2001 From: laffed Date: Wed, 30 Aug 2023 14:01:39 -0500 Subject: [PATCH] remove dep enum --- src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3aa18dc..f703687 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import compass, { CardinalSubset } from 'cardinal-direction'; +import compass from 'cardinal-direction'; const PadPosition = { N: "L", @@ -16,7 +16,7 @@ class WestPad { constructor(direction: Direction | number) { if (typeof direction === 'number') { - this.direction = compass.cardinalFromDegree(direction % 360, CardinalSubset.Basic) as Direction; + this.direction = compass.cardinalFromDegree(direction % 360, 8) as Direction; } else { this.direction = direction; } @@ -26,7 +26,7 @@ class WestPad { updateDirection(direction: Direction | number) { if (typeof direction === 'number') { - this.direction = compass.cardinalFromDegree(direction % 360, CardinalSubset.Basic) as Direction; + this.direction = compass.cardinalFromDegree(direction % 360, 8) as Direction; } else { this.direction = direction; } @@ -57,7 +57,7 @@ class WestPad { const westPad = (direction: Direction | number, s: string, multiplicand: number = 1, p: string = " "): string => { const padpos = typeof direction === 'number' - ? PadPosition[compass.cardinalFromDegree(direction % 360, CardinalSubset.Basic) as Direction] + ? PadPosition[compass.cardinalFromDegree(direction % 360, 8) as Direction] : PadPosition[direction]; switch (padpos) { @@ -71,7 +71,7 @@ const westPad = (direction: Direction | number, s: string, multiplicand: number const notWestPad = (direction: Direction | number, s: string, multiplicand: number = 1, p: string = " "): string => { const padpos = typeof direction === 'number' - ? PadPosition[compass.cardinalFromDegree(direction % 360, CardinalSubset.Basic) as Direction] + ? PadPosition[compass.cardinalFromDegree(direction % 360, 8) as Direction] : PadPosition[direction]; switch (padpos) {