mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 15:04:07 +01:00
This commit is contained in:
parent
11786381cf
commit
449d2dbf87
2 changed files with 12 additions and 19 deletions
|
|
@ -90,11 +90,3 @@ export const objEquals = (a: any, b: any): boolean => {
|
|||
if (keys.length !== Object.keys(b).length) return false;
|
||||
return keys.every(k => objEquals(a[k], b[k]));
|
||||
};
|
||||
|
||||
export const trimPrefix = (str: string, prefix: string) => {
|
||||
return str.startsWith(prefix) ? str.slice(prefix.length) : str;
|
||||
}
|
||||
|
||||
export const trimSuffix = (str: string, suffix: string) => {
|
||||
return str.endsWith(suffix) ? str.slice(0, -suffix.length) : str;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue