How to use the colors-cli/safe.x161 function in colors-cli

To help you get started, we’ve selected a few colors-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jaywcjlove / wcj / lib / resume.js View on Github external
function preview_itskill(){
    var its = itskill.data;
    log()
    log(" "+color.x46(itskill.title))
    log()
    for (var i = 0; i < its.length; i++) {

        var txt = ''

        for(var a in its[i]){
            if(its[i][a]) {
                txt += a + ':' + its[i][a] + ' | ';
                // log("   ■ " + (its[i][a]? a + ':' + its[i][a]:"") )
            }
        }
        log("   " + color.x161('■ ') + txt)
        // log("   ----------------------------");
    };
    log()
}
github jaywcjlove / wcj / lib / resume.js View on Github external
function preview_education(){
    var edu = education.data;
    log()
    log(" "+color.x46(education.title))
    for (var i = 0; i < edu.length; i++) {
        for(var a in edu[i]){
            if(a === "timePeriod") log(),
                log("   " + color.x161('■ ') + edu[i][a].val),
                log("   ----------------------------");
            else log("   " + color.x161('› ') + edu[i][a].info + " : " + edu[i][a].val);
        }
    };
    log()
}
github jaywcjlove / wcj / lib / resume.js View on Github external
function preview_education(){
    var edu = education.data;
    log()
    log(" "+color.x46(education.title))
    for (var i = 0; i < edu.length; i++) {
        for(var a in edu[i]){
            if(a === "timePeriod") log(),
                log("   " + color.x161('■ ') + edu[i][a].val),
                log("   ----------------------------");
            else log("   " + color.x161('› ') + edu[i][a].info + " : " + edu[i][a].val);
        }
    };
    log()
}
github jaywcjlove / wcj / lib / resume.js View on Github external
if(cmd === 'preview'){
        //提供可选参数预览简历
        preview_basicinfo();
        preview_education();
        preview_itskill();
    }else if(options.basicinfo){
        //基本信息
        if(options.basicinfo === true && !cmd){
            preview_basicinfo();
        }else if(!basicinfo.data[cmd || options.basicinfo]){
            error_undefine(options,(cmd||options.basicinfo))
        }else{
            for (var a in basicinfo.data) {
                if(cmd === a || a === options.basicinfo){
                    log()
                    log('   '+color.x46.bold('› '+basicinfo.data[a].info + " : ") + color.x161(basicinfo.data[a].val));
                    log()
                }
            };
        }
    }else if(options.education){
        //教育经历预览
        if(options.education === true && !cmd){
            preview_education();
        }else{
            error_undefine(options,(cmd||options.education))
        }
    }else if(options.itskill){
        //IT技能 预览
        if(options.itskill === true && !cmd){
            preview_itskill();
        }else{