Skip to content

Commit

Permalink
Alias grey to gray. Fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 29, 2013
1 parent f7514e8 commit 38efc46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
var ansi = require('ansi-styles');
var defineProps = Object.defineProperties;

ansi.grey = ansi.gray;

var styles = (function () {
var ret = {};

Expand Down
4 changes: 4 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ describe('chalk', function () {
it('should reset all styles with `.reset()`', function () {
assert.equal(chalk.reset(chalk.red.bgGreen.underline('foo') + 'foo'), '\x1b[0m\x1b[4m\x1b[42m\x1b[31mfoo\x1b[39m\x1b[49m\x1b[24mfoo\x1b[0m');
});

it('should alias gray to grey', function () {
assert.equal(chalk.grey('foo'), '\x1b[90mfoo\x1b[39m');
});
});

describe('chalk.enabled', function () {
Expand Down

0 comments on commit 38efc46

Please sign in to comment.