-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 상수명 명확하게 변경 및 비슷한 상수 객체로 묶음
- Loading branch information
Showing
3 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
export const INITIAL_QUANTITY: Readonly<string> = '1'; | ||
export const NONE_QUANTITY: Readonly<string> = '0'; | ||
export const QUANTITY: Readonly<Record<string, string>> = { | ||
INITIAL: '1', | ||
NONE: '0', | ||
}; | ||
|
||
export const NOT_NUMBER: Readonly<RegExp> = /[^0-9]/g; | ||
export const CART_ITEM_EXISTS: Readonly<number> = 0; | ||
export const ONE_ITEM_IN_CART: Readonly<number> = 1; | ||
export const NOT_NUMBER = /[^0-9]/g; | ||
|
||
export const FIRST_INDEX = 0; | ||
export const ONE_ITEM_IN_CART = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters