Skip to content

Commit

Permalink
feat: add new util
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Mar 10, 2021
1 parent 9e17db3 commit 5d07aae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,10 @@ export const isIp = (str: string): boolean =>

// istanbul ignore next
export const isNow = (): boolean =>
typeof process.env.NOW_REGION !== 'undefined';
typeof process.env.NOW_REGION !== 'undefined' || typeof process.env.VERCEL_REGION !== 'undefined';

// istanbul ignore next
export const isVercel = (): boolean => isNow()

// istanbul ignore next
export const isHeroku = (): boolean => typeof process.env.DYNO !== 'undefined';
Expand Down

0 comments on commit 5d07aae

Please sign in to comment.