(value, options)
| 52 | * @return {string} str |
| 53 | */ |
| 54 | export function format (value, options) { |
| 55 | const result = _format(value, options) |
| 56 | if (options && typeof options === 'object' && 'truncate' in options && |
| 57 | result.length > options.truncate) { |
| 58 | return result.substring(0, options.truncate - 3) + '...' |
| 59 | } |
| 60 | return result |
| 61 | } |
| 62 | |
| 63 | function _format (value, options) { |
| 64 | if (typeof value === 'number') { |
no test coverage detected
searching dependent graphs…