* Pretty print the Pin count with english suffixes * @param {number|string} count The Pin count for the source URL * @return {string}
(count)
| 88 | * @return {string} |
| 89 | */ |
| 90 | formatPinCount(count) { |
| 91 | if (count > 999) { |
| 92 | if (count < 1000000) { |
| 93 | count = parseInt(count / 1000, 10) + 'K+'; |
| 94 | } else { |
| 95 | if (count < 1000000000) { |
| 96 | count = parseInt(count / 1000000, 10) + 'M+'; |
| 97 | } else { |
| 98 | count = '++'; |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | return String(count); |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Render helper for the optional count bubble |