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

@theoparis/config

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theoparis/config

F*ck the config

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ftconfig

F*ck the config

node Known Vulnerabilities Author MIT-License npm type definitions

Installation

npm install @theoparis/config

Usage

const ftconfig = require("@theoparis/config");
const config = ftconfig.readFile("./package.json")
    .modify((obj) => {
        config.name = "simple";
        return obj
    })
    .save();
const obj = config.toObject();

Module Methods

ftconfig.readFile(filepath, [options])

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

Class Config

ftconfig.read(configString, [options])

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

Class Config

ftconfig.read(configString, [type])

Parameters
  • configString {String} config string
  • type {String}
    • yaml
    • json
    • json5
    • hjson
    • toml
    • ini
Return

Class Config

Config.modify(function)

Parameters
  • configString {Function} Get which type Return what
Return

Class Config

Config.validate(modify, [options])

Parameters
  • modify {boolean} Modify the config object or just validate it
  • callback {Function}
Return

Class Config

Config.save([filepath])

Parameters
  • filepath {String} Target Filepath
Return

Class Config

Config.save([options])

Parameters
  • options {Object}
    • path {String}
    • encoding {String="utf-8"}
    • indent {Number=2}
Return

Class Config

Config.toString([options])

Parameters
  • options {any}
Return

String

Config.toObject()

Return

Object

Keywords

FAQs

Package last updated on 19 Jun 2021

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