Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ftconfig

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftconfig

F*ck the config

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77
increased by45.28%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 22 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc