Skip to content

The open alternative to Salesforce, designed for AI.

220 B
Raw Blame
import { isNonEmptyString } from '@sniptt/guards';

export const indentNonEmptyLines = (text: string): string =>
  text
    .split('\n')
    .map((line) => (isNonEmptyString(line) ? `  ${line}` : line))
    .join('\n');