From d43751fbe58042b12741ea0b4fa8fb6509e0ea59 Mon Sep 17 00:00:00 2001 From: Hexiro <42787085+Hexiro@users.noreply.github.com> Date: Wed, 23 Jun 2021 21:13:06 -0400 Subject: [PATCH] return boolean expression instead of using if statement --- src/snowflake.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/snowflake.ts b/src/snowflake.ts index a75ffec..6aa2359 100644 --- a/src/snowflake.ts +++ b/src/snowflake.ts @@ -11,10 +11,7 @@ const EPOCH = 1420070400000; // Discord's EPOCH export function isSnowflake(snowflake: string): boolean { const { timestamp } = deconstruct(snowflake); - if (timestamp > EPOCH && timestamp <= 3619093655551) { - return true; - } - return false; + return (timestamp > EPOCH && timestamp <= 3619093655551); } function deconstruct(snowflake: string): DeconstructedSnowflake {