mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-20 17:33:18 +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')
|