Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cfonts

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cfonts - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

18

bin/font.js

@@ -54,11 +54,11 @@ #!/usr/bin/env node

var cfonts = new CFONTS(
program.text,
program.font,
program.colors,
program.background,
program.letterSpacing,
program.space,
program.maxLength
);
var cfonts = new CFONTS({
"text": program.text,
"font": program.font,
"colors": program.colors,
"background": program.background,
"letterSpacing": program.letterSpacing,
"space": program.space,
"maxLength": program.maxLength
});

@@ -65,0 +65,0 @@ }

@@ -19,2 +19,5 @@ /*

//--------------------------------------------------------------------------------------------------------------------------------------------------------------
// Custom functions
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
function colorize($font, OPTIONS, $character) {

@@ -42,16 +45,18 @@

//--------------------------------------------------------------------------------------------------------------------------------------------------------------
function cfonts($input, setFont, setColors, setBackground, setLetterSpacing, setSpace, setMaxLength) {
function cfonts($SETTINGS) {
//options
var OPTIONS = {
font: setFont || 'block', //define the font face
colors: setColors || [], //define all colors
background: setBackground || 'Black', //define the background color
letterSpacing: setLetterSpacing || 1, //define letter spacing
space: setSpace === undefined ? true : true, //define if the output text should have empty lines on top and on the bottom
maxLength: setMaxLength || 10 //define how many character can be on one line
font: $SETTINGS.font || 'block', //define the font face
colors: $SETTINGS.colors || [], //define all colors
background: $SETTINGS.background || 'Black', //define the background color
letterSpacing: $SETTINGS.letterSpacing || 1, //define letter spacing
space: $SETTINGS.space === undefined ? true : true, //define if the output text should have empty lines on top and on the bottom
maxLength: $SETTINGS.maxLength || 10 //define how many character can be on one line
};
var $font = JSON.parse(fs.readFileSync(__dirname + '/fonts/' + OPTIONS.font + '.json', 'utf8'));
var $input = $SETTINGS.text;
var $font = JSON.parse(fs.readFileSync(__dirname + '/fonts/' + OPTIONS.font + '.json', 'utf8')); //TODO: needs error handling
var $output = [];

@@ -58,0 +63,0 @@ for(var i = 0, length = $font.lines; i < length; i++) { //create first lines with buffer

{
"name": "cfonts",
"description": "Sexy fonts for the console",
"version": "0.0.6",
"version": "0.0.7",
"homepage": "https://github.com/dominikwilkowski/cfonts",

@@ -20,3 +20,3 @@ "author": {

{
"type": "MIT",
"type": "GNU-GPL",
"url": "https://github.com/dominikwilkowski/cfonts/blob/master/LICENSE"

@@ -23,0 +23,0 @@ }

@@ -39,11 +39,11 @@ ```shell

var fonts = new FONTS(
text, //text to be converted
font, //define the font face
colors, //define all colors
background, //define the background color
letterSpacing, //define letter spacing
space, //define if the output text should have empty lines on top and on the bottom
maxLength //define how many character can be on one line
);
var fonts = new FONTS({
'text': 'Hello World', //text to be converted
'font': 'block', //define the font face
'colors': '', //define all colors
'background': 'Black', //define the background color
'letterSpacing': '1', //define letter spacing
'space': true, //define if the output text should have empty lines on top and on the bottom
'maxLength': '10' //define how many character can be on one line
});
```

@@ -261,2 +261,3 @@

## Release History
* 0.0.7 - changed to settings object
* 0.0.6 - added `3d` font

@@ -263,0 +264,0 @@ * 0.0.5 - added grunt test

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc