Effect CommunityEC
Effect Community3y ago
15 replies
Sadra

Using Chalk for Console Logging in Effect.tap

is chalk considered as side effect or we can use directly inside Effect.tap ?
Effect.tap(() =>
  Effect.sync(() => {
    const { hostname } = new URL(matchUrl);
    console.log(chalk.gray("->"), chalk[color](`Visiting ${hostname} done!`));
  })
),
Was this page helpful?