channelTransfer.js 668 Bytes
'use strict';

exports.channelNumber2String = (channel) => {
    let channelStr = 'boy';
    if (channel == 1) {
    	channelStr = 'boy';
    } else if (channel == 2) {
    	channelStr = 'girl';
    } else if (channel == 3) {
    	channelStr = 'kid';
    } else if (channel == 4) {
    	channelStr = 'lifeStyle';
    }
    return channelStr;
};

exports.channelString2Number = (channelStr) => {
    let channel = 1;
    if (channelStr == 'boy') {
    	channel = 1;
    } else if (channelStr == 'girl') {
    	channel = 2;
    } else if (channelStr == 'kid') {
    	channel = 3;
    } else if (channelStr == 'lifeStyle') {
    	channel = 4;
    }
    return channel;
};