mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Prefer arrow functions (#2344)
This commit is contained in:
parent
e05acd6fd9
commit
a20f3240fd
19 changed files with 304 additions and 336 deletions
|
@ -242,12 +242,12 @@ const RE_RTL_CHECK = new RegExp(`^[^${RS_LTR_CHARS}]*[${RS_RTL_CHARS}]`);
|
|||
*/
|
||||
export const isRTL = (text: string) => RE_RTL_CHECK.test(text);
|
||||
|
||||
export function tupleToCoors(
|
||||
export const tupleToCoors = (
|
||||
xyTuple: readonly [number, number],
|
||||
): { x: number; y: number } {
|
||||
): { x: number; y: number } => {
|
||||
const [x, y] = xyTuple;
|
||||
return { x, y };
|
||||
}
|
||||
};
|
||||
|
||||
/** use as a rejectionHandler to mute filesystem Abort errors */
|
||||
export const muteFSAbortError = (error?: Error) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue