F*ck the config
npm install ftconfig
import ftconfig = require("ftconfig");
const config = ftconfig.readFile("./package.json")
.modify((obj) => {
config.name = "simple";
return obj
})
.save();
const obj = config.toObject();
filepath
{String}
Filepathoptions
{Object}
encoding
{String="utf-8"}
type
{String}
yaml
json
json5
hjson
toml
ini
Class Config
configString
{String}
config stringoptions
{Object}
type
{String}
yaml
json
json5
hjson
toml
ini
Class Config
configString
{String}
config stringtype
{String}
yaml
json
json5
hjson
toml
ini
Class Config
configString
{Function}
Get which type Return what
Class Config
filepath
{String}
Targe Filepath
Class Config
options
{Object}
path
{String}
encoding
{String="utf-8"}
indent
{Number=2}
Class Config
options
{any}
String
Object