bluefire
Version:
Lightweight tcp framework
35 lines (26 loc) • 680 B
text/coffeescript
###
Class that loads the file and keeps the contents as configurations
###
module.exports = class Configuration
constructor: (module = null) ->
if module? and typeof module is "object"
= module
else if typeof module is "string"
= require(module)
else
= { }
add: (key, value) =>
[key] = value
return [key]
get: (key) =>
return [key]
remove: (key) ->
delete [key]
###
Method that indicates if configuration data set is empty
[Boolean] true if set is empty, else false
###
empty: () ->
return is 0
length: () ->
return Object.keys().length