aio-config
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.5 • Public • Published

    ftconfig

    F*ck the config

    node Travis Coveralls Known Vulnerabilities David Author MIT-License 996ICU-License

    Usage

    Install with npm

    npm install ftconfig
    const ftconfig = require("ftconfig");
    const config = ftconfig.loadFile("./package.json")
      .modify((obj) => {
        config.name = "simple";
        return obj
      })
      .save();
    const obj = config.toObject();

    Module Methods

    ftconfig.readFile(filepath, [options])

    Paramseters

    • filepath {String} Filepath
    • options {Object}
      • encoding {String="utf-8"}
      • type {String}
        • yaml
        • json
        • json5
        • hjson
        • toml
        • ini

    Return

    Class Config

    ftconfig.read(configString, [options])

    Paramseters

    • configString {String} config string
    • options {Object}
      • type {String}
        • yaml
        • json
        • json5
        • hjson
        • toml
        • ini

    Return

    Class Config

    ftconfig.read(configString, [type])

    Paramseters

    • configString {String} config string
    • type {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

    Install

    npm i aio-config

    DownloadsWeekly Downloads

    1

    Version

    1.1.5

    License

    MIT

    Unpacked Size

    84.6 kB

    Total Files

    153

    Last publish

    Collaborators

    • wyh.michael