-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Upgrade packages, add explicit prettier config
- Loading branch information
Showing
11 changed files
with
2,129 additions
and
3,239 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: false, | ||
jsxSingleQuote: false, | ||
trailingComma: "none", | ||
bracketSpacing: false, | ||
jsxBracketSameLine: true, | ||
arrowParens: "always" | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,27 +1,22 @@ | ||
function createMapFromObject(obj: { [key: string]: any }) { | ||
function createMapFromObject(obj: {[key: string]: any}) { | ||
return new Map(Object.entries(obj)); | ||
} | ||
|
||
function isArrayOfStrings(x: unknown): x is string[] { | ||
return Array.isArray(x) && x.every(item => typeof item === "string"); | ||
return Array.isArray(x) && x.every((item) => typeof item === "string"); | ||
} | ||
|
||
function isArrayOfObjects(x: unknown): x is Array<{ [key: string]: any }> { | ||
function isArrayOfObjects(x: unknown): x is Array<{[key: string]: any}> { | ||
return ( | ||
Array.isArray(x) && | ||
x.every(item => typeof item === "object" && !Array.isArray(item)) | ||
x.every((item) => typeof item === "object" && !Array.isArray(item)) | ||
); | ||
} | ||
|
||
function isObjectEmpty(obj: unknown): obj is {} { | ||
function isObjectEmpty(obj: unknown): obj is unknown { | ||
return typeof obj === "object" && !Array.isArray(obj) && obj | ||
? Object.keys(obj).length === 0 | ||
: false; | ||
} | ||
|
||
export { | ||
createMapFromObject, | ||
isArrayOfStrings, | ||
isArrayOfObjects, | ||
isObjectEmpty | ||
}; | ||
export {createMapFromObject, isArrayOfStrings, isArrayOfObjects, isObjectEmpty}; |
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,8 +1,8 @@ | ||
function convertSnakeCaseToTitleCase(string: string) { | ||
return string | ||
.split("_") | ||
.map(word => word[0].toUpperCase() + word.slice(1)) | ||
.map((word) => word[0].toUpperCase() + word.slice(1)) | ||
.join(" "); | ||
} | ||
|
||
export { convertSnakeCaseToTitleCase }; | ||
export {convertSnakeCaseToTitleCase}; |
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