Web Component: Tangular-Counter


  • Info
  • HTML
  • JS
  • CSS
  • Meta

Tangular-Counter

This helper can create a short value from big numbers.

  • jComponent v19|v20
Thelpers.counter([value], [decimals]);
// @value {Number} a value
// @decimals {Number} optional, count of decimals (default: `0`)

Outputs:

  • 10 K
  • 1 024
  • 1 M

Usage:

<h1>{{ name }}</h1>
<div>{{ userscount | counter }}</div>

or

console.log(Thelpers.counter(134000));