Total Complexity | 5 |
Complexity/F | 2.5 |
Lines of Code | 13 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | "use strict"; |
||
2 | |||
3 | const { blank } = require ('printable-characters') |
||
4 | |||
5 | module.exports = (bullet, arg) => { |
||
6 | |||
7 | const isArray = Array.isArray (arg), |
||
8 | lines = isArray ? arg : arg.split ('\n'), |
||
9 | indent = blank (bullet), |
||
10 | result = lines.map ((line, i) => (i === 0) ? (bullet + line) : (indent + line)) |
||
11 | |||
12 | return isArray ? result : result.join ('\n') |
||
13 | } |