How to use the kleur.black function in kleur

To help you get started, we’ve selected a few kleur 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 30-seconds / 30-seconds-of-code / scripts / tag.js View on Github external
.trim()}\n`;
    } else {
      output += `${snippet[0].slice(0, -3)}:uncategorized\n`;
      missingTags++;
      console.log(`${yellow('Tagged uncategorized:')} ${snippet[0].slice(0, -3)}`);
    }
  }
  // Write to tag_database
  fs.writeFileSync('tag_database', output);
} catch (err) {
  // Handle errors (hopefully not!)
  console.log(`${red('ERROR!')} During tag_database generation: ${err}`);
  process.exit(1);
}
// Log statistics for the tag_database file
console.log(`\n${bgWhite(black('=== TAG STATS ==='))}`);
for (let tagData of Object.entries(tagDbStats)
  .filter(v => v[0] !== 'undefined')
  .sort((a, b) => a[0].localeCompare(b[0])))
  console.log(`${green(tagData[0])}: ${tagData[1]} snippets`);
console.log(
  `${blue("New untagged snippets (will be tagged as 'uncategorized'):")} ${missingTags}\n`
);
// Log a success message
console.log(`${green('SUCCESS!')} tag_database file updated!`);
// Log the time taken
console.timeEnd('Tagger');
github verdaccio / verdaccio / src / lib / logger / levels.ts View on Github external
case x == 35:
            return 'http';
        case x < 45:
            return 'warn';
        case x < 55:
            return 'error';
        default:
            return 'fatal';
    }
}

export const subsystems = [
    {
        in: green('<--'),
        out: yellow('-->'),
        fs: black('-=-'),
        default: blue('---'),
    },
    {
        in: '<--',
        out: '-->',
        fs: '-=-',
        default: '---',
    },
];