ftconfig
F*ck the config
Usage
Install with npm
npm install ftconfig
; .modify .save;;
Module Methods
ftconfig.readFile(filepath, [options])
Paramseters
filepath
{String}
Filepathoptions
{Object}
encoding
{String="utf-8"}
type
{String}
yaml
json
json5
hjson
toml
ini
Return
Class Config
ftconfig.read(configString, [options])
Paramseters
configString
{String}
config stringoptions
{Object}
type
{String}
yaml
json
json5
hjson
toml
ini
Return
Class Config
ftconfig.read(configString, [type])
Paramseters
configString
{String}
config stringtype
{String}
yaml
json
json5
hjson
toml
ini
Return
Class Config
Config.modify(function)
Paramseters
configString
{Function}
Get which type Return what
Return
Class Config
Config.save([filepath])
Paramseters
filepath
{String}
Targe Filepath
Return
Class Config
Config.save([options])
Paramseters
options
{Object}
path
{String}
encoding
{String="utf-8"}
indent
{Number=2}
Return
Class Config
Config.toString([options])
Paramseters
options
{any}
Return
String
Config.toObject()
Return
Object