Skip to content

Commit

Permalink
deleted unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 10, 2015
1 parent 3f36779 commit 72c10f4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,13 @@ You can modify the outputted message at any time.
Create a new logger. Available options:

- color **{Boolean}**: Enable or disable colorized output. `false` by default.
- level **{String}**: Provide the logging level. `info` by default.
- level **{String}**: Provides the logging level. `info` by default.
- types **{Object}**: You can provide the types and priorities.
- outputType **{Function}**: Provide a function to customize the type in the output.
- outputMessage **{Function}**: Provide a function to customize the message in the output.
- print **{Function}**: Provide a function to print the messages.
- print **{Function}**: Provides a function to print the messages.
- muted **{String}**: Determines the log level to avoid output messages. `silent` by default.
- outputType **{Function}**: Provides a function to customize the type in the output.
- outputMessage **{Function}**: Provides a function to customize the message in the output.


### .push({String} <type>, {String} <message>)

Expand Down
8 changes: 6 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acho",
"description": "A extremely (but powerful) simple logging system for NodeJS and browser.",
"description": "An extremely simple (but powerful) logging system for NodeJS and browser.",
"version": "1.0.5",
"authors": [
"Kiko Beats [email protected]"
Expand All @@ -14,7 +14,11 @@
],

"homepage": "https://github.com/Kikobeats/acho",
"keywords": ["log", "logging"],
"keywords": [
"log",
"logging"
"logger"
],
"license": "MIT",
"main": "dist/acho.js",
"repository": "Kikobeats/acho"
Expand Down
17 changes: 8 additions & 9 deletions lib/Acho.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@

chalk = require 'chalk'
DEFAULT = require './Default'
exists = require 'existential-default'

module.exports = class Acho

constructor: (options = {}) ->
@color = exists options.color, DEFAULT.COLOR
@level = exists options.level, DEFAULT.LEVEL
@types = exists options.types, DEFAULT.TYPES
@print = exists options.print, DEFAULT.PRINT
@muted = exists options.muted, DEFAULT.MUTED
@messages = exists options.messages, do =>
@color = options.color or DEFAULT.COLOR
@level = options.level or DEFAULT.LEVEL
@types = options.types or DEFAULT.TYPES
@print = options.print or DEFAULT.PRINT
@muted = options.muted or DEFAULT.MUTED
@messages = do =>
messages = {}
messages[type] = [] for type of @types
messages
@outputType = exists options.outputType, DEFAULT.OUTPUT_TYPE
@outputMessage = exists options.outputMessage, DEFAULT.OUTPUT_MESSAGE
@outputType = options.outputType or DEFAULT.OUTPUT_TYPE
@outputMessage = options.outputMessage or DEFAULT.OUTPUT_MESSAGE
this

@DEFAULT: DEFAULT
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"keywords": [
"log",
"logging"
"logger"
],
"dependencies": {
"chalk": "*",
"coffee-script": "*",
"existential-default": "^1.0.0"
},
"devDependencies": {
"browserify": "*",
Expand Down

0 comments on commit 72c10f4

Please sign in to comment.