feature: initial commit
This commit is contained in:
commit
ce024ba87a
17 changed files with 1141 additions and 0 deletions
1
utils/optional.ts
Normal file
1
utils/optional.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
5
utils/sanitize.ts
Normal file
5
utils/sanitize.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export default function sanitize(path: string): string {
|
||||
return path.replace(/^\./, '__.')
|
||||
.replace(/\//g, '__fwdslash__')
|
||||
.replace(/\*/g, '__star__');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue