|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
437 bytes
|
| Line | |
|---|
| 1 | 'use strict'
|
|---|
| 2 |
|
|---|
| 3 | exports.toString = function (klass) {
|
|---|
| 4 | switch (klass) {
|
|---|
| 5 | case 1: return 'IN'
|
|---|
| 6 | case 2: return 'CS'
|
|---|
| 7 | case 3: return 'CH'
|
|---|
| 8 | case 4: return 'HS'
|
|---|
| 9 | case 255: return 'ANY'
|
|---|
| 10 | }
|
|---|
| 11 | return 'UNKNOWN_' + klass
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | exports.toClass = function (name) {
|
|---|
| 15 | switch (name.toUpperCase()) {
|
|---|
| 16 | case 'IN': return 1
|
|---|
| 17 | case 'CS': return 2
|
|---|
| 18 | case 'CH': return 3
|
|---|
| 19 | case 'HS': return 4
|
|---|
| 20 | case 'ANY': return 255
|
|---|
| 21 | }
|
|---|
| 22 | return 0
|
|---|
| 23 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.