@akashrajpurohit/utils
    Preparing search index...

    Function convertNewlines

    • Convert newlines to specified element

      Parameters

      • string: string

        string to convert

      • replacement: string = ' '

        replacement to convert newlines to

      Returns string

      string with newlines converted to specified element

      convertNewlines('Hello\nworld!') // 'Hello world!'