mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-27 04:32:32 +02:00
refactor(starter): upgrade to new version of gatsby
This commit is contained in:
3
internal/gatsby/utils/concat.ts
Normal file
3
internal/gatsby/utils/concat.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
const concat = (...args: string[]): string => args.join("");
|
||||
|
||||
export default concat;
|
3
internal/gatsby/utils/decrement.ts
Normal file
3
internal/gatsby/utils/decrement.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
const decrement = (n: number): number => n - 1;
|
||||
|
||||
export default decrement;
|
3
internal/gatsby/utils/increment.ts
Normal file
3
internal/gatsby/utils/increment.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
const increment = (n: number): number => n + 1;
|
||||
|
||||
export default increment;
|
4
internal/gatsby/utils/index.ts
Normal file
4
internal/gatsby/utils/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export { default as toKebabCase } from "./to-kebab-case";
|
||||
export { default as decrement } from "./decrement";
|
||||
export { default as increment } from "./increment";
|
||||
export { default as concat } from "./concat";
|
6
internal/gatsby/utils/to-kebab-case.ts
Normal file
6
internal/gatsby/utils/to-kebab-case.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
const toKebabCase = (str: string = ""): string => str.toLowerCase()
|
||||
.replace(/[^\w\s]/gi, "")
|
||||
.split(" ").join("-")
|
||||
.split("_").join("-");
|
||||
|
||||
export default toKebabCase;
|
Reference in New Issue
Block a user