(gradients)
| 17928 | */ |
| 17929 | |
| 17930 | var sortGradient = function sortGradient(gradients) { |
| 17931 | var tempArr = []; |
| 17932 | Object.keys(gradients).forEach(function (key) { |
| 17933 | var formattedKey = parseFloat(key.replace(/%/g, '')); |
| 17934 | |
| 17935 | if (!isNaN(formattedKey)) { |
| 17936 | tempArr.push({ |
| 17937 | key: formattedKey, |
| 17938 | value: gradients[key] |
| 17939 | }); |
| 17940 | } |
| 17941 | }); |
| 17942 | tempArr = tempArr.sort(function (a, b) { |
| 17943 | return a.key - b.key; |
| 17944 | }); |
| 17945 | return tempArr.map(function (_ref) { |
| 17946 | var key = _ref.key, |
| 17947 | value = _ref.value; |
| 17948 | return "".concat(value, " ").concat(key, "%"); |
| 17949 | }).join(', '); |
| 17950 | }; |
| 17951 | /** |
| 17952 | * Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and |
| 17953 | * butter, there is the bug. And... Besides women, there is the code. |
no test coverage detected
searching dependent graphs…