Dalek.Config Class
Parses config data & loads config files
Item Index
Methods
_checkDefaultFile
-
ext
-
data
Iterator function that checks the existance of a the default file
Parameters:
-
ext
StringFile extension to check
-
data
ObjectFile data
Returns:
config File path
_checkFile
-
previousValue
-
ext
-
idx
-
data
Iterator function that checks the existance of a given file
Parameters:
-
previousValue
StringLast iterations result
-
ext
StringFile extension to check
-
idx
IntegerIteration index
-
data
ObjectFile data
Returns:
config File path
_verify
-
check
-
fn
-
instance
Verifies if a driver is given, exists & is valid
Parameters:
-
check
ArrayData that shoudl be mapped
-
fn
StringName of the function that should be invoked on the veryify object
-
instance
ObjectObject instance where the verify function should be invoked
Returns:
data List of verified items
_verifyIterator
-
fn
-
instance
-
elm
Verifies if a driver is given, exists & is valid
Parameters:
-
fn
StringName of the function that should be invoked on the veryify object
-
instance
ObjectObject instance where the verify function should be invoked
-
elm
StringName of the element that should be checked
Returns:
element name of the verified element or false if checked failed
checkAvailabilityOfConfigFile
-
pathname
Checks if a config file is available
Parameters:
-
pathname
String
Returns:
config File path
get
-
item
Fetches & returns a config item
Parameters:
-
item
StringKey of the item to load
Returns:
data Requested config data
load
-
defaults
-
pathname
-
opts
Loads a file & merges the results with the commandline options & the default config
Parameters:
-
defaults
ObjectDefault config
-
pathname
StringFilename of the config file to load
-
opts
ObjectCommand line options
Returns:
config Merged config data
loadFile
-
pathname
Loads a config file & parses it based on the file extension
Parameters:
-
pathname
StringFilename of the config file to load
Returns:
data Config data
readcoffee
()
Object
Loads a coffescript config file
Returns:
data Parsed config data
readjs
()
Object
Loads a javascript config file
Returns:
data Parsed config data
readjson
()
Object
Loads a json config file
Returns:
data Parsed config data
readJson5
()
Object
Loads a json5 config file
Returns:
data Parsed config data
readyaml
()
Object
Loads a yaml config file
Returns:
data Parsed config data
verifyDrivers
()
Array
Verifies if a driver is given, exists & is valid
Returns:
data List of verified drivers
verifyReporters
()
Array
Verifies if a reporter is given, exists & is valid
Returns:
data List of verified reporters