From 72c10f40c58aa9d7753a4dc768f17f19fbae0e93 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Sun, 10 May 2015 22:23:35 +0200 Subject: [PATCH] deleted unnecessary code --- README.md | 10 ++++++---- bower.json | 8 ++++++-- lib/Acho.coffee | 17 ++++++++--------- package.json | 2 +- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e806af0..c15ab5a 100755 --- a/README.md +++ b/README.md @@ -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>) diff --git a/bower.json b/bower.json index 196f0aa..125026b 100755 --- a/bower.json +++ b/bower.json @@ -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 josefrancisco.verdu@gmail.com" @@ -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" diff --git a/lib/Acho.coffee b/lib/Acho.coffee index 2bc5b2b..5cd24e8 100644 --- a/lib/Acho.coffee +++ b/lib/Acho.coffee @@ -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 diff --git a/package.json b/package.json index 3d741a8..3fd8a8f 100755 --- a/package.json +++ b/package.json @@ -19,11 +19,11 @@ "keywords": [ "log", "logging" + "logger" ], "dependencies": { "chalk": "*", "coffee-script": "*", - "existential-default": "^1.0.0" }, "devDependencies": { "browserify": "*",