mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 14:13:07 +00:00
6 lines
189 B
CoffeeScript
6 lines
189 B
CoffeeScript
exports.formatLongString = (string, n) ->
|
|
return string if not n?
|
|
splitRegexp = new RegExp(".{1,#{n}}", 'g')
|
|
splittedString = string.match(splitRegexp)
|
|
return splittedString.join('\n')
|