File size: 226 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

/* MAIN */

const Unit = {

  /* API */

  dec2hex: ( dec: number ): string => {

    const hex = Math.round ( dec ).toString ( 16 );

    return hex.length > 1 ? hex : `0${hex}`;

  }

};

/* EXPORT */

export default Unit;