join-strings-in-array
v0.0.4
Published
Joins strings in given array with the given or default delimiter
Downloads
10
Readme
join-strings-in-array
Joins strings in given array with the given or default delimiter. With the flag trims last delimiter in non last items
Instalation
npm i --save join-strings-in-array
Arguments
joinStringsInArray(array[, delimeter = ' ', trimLast = false])
Examples
import joinStringsInArray from 'join-strings-in-array'
joinStringsInArray(['a', 'b', {}, 'c']), // ['a b ', {}, 'c']
joinStringsInArray(['a', 'b', {}, 'c'], true), // ['a b', {}, 'c']
joinStringsInArray(['a', 'b', {}, 'c'], '-'), // ['a-b-', {}, 'c']
joinStringsInArray(['a', 'b', {}, 'c'], '-', true), // ['a-b', {}, 'c']