(line, index, count)
| 44 | * @param {number} count |
| 45 | */ |
| 46 | export function _decodeFill(line, index, count) { |
| 47 | /** @type {string | {value: number}} */ |
| 48 | const fill = parseFillOption(line); |
| 49 | |
| 50 | if (isObject(fill)) { |
| 51 | return isNaN(fill.value) ? false : fill; |
| 52 | } |
| 53 | |
| 54 | let target = parseFloat(fill); |
| 55 | |
| 56 | if (isFinite(target) && Math.floor(target) === target) { |
| 57 | return decodeTargetIndex(fill[0], index, target, count); |
| 58 | } |
| 59 | |
| 60 | return ['origin', 'start', 'end', 'stack', 'shape'].indexOf(fill) >= 0 && fill; |
| 61 | } |
| 62 | |
| 63 | function decodeTargetIndex(firstCh, index, target, count) { |
| 64 | if (firstCh === '-' || firstCh === '+') { |
no test coverage detected