New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

optional-conf

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

optional-conf

A wrapper around conf which makes storing the config to disk optional

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

Optional Conf

An extension to Conf which allows simple configuration for your app or module while making actually persisting the config to disk optional.

When not persisting to disk, the configuration will only last for the duration of the current script execution.

Description

This makes Conf suitable for getting and setting your config values whether or not your users want the configuration written to disk or just stored in memory.

When not stored in memory, it can still be a great library for getting and setting runtime configuration which is passed in the initial constructor.

Use it exactly like Conf, except you can pass an additional boolean argument named persist into the constructor.

  • If !!persist === true then OptionalConf will work exactly like the parent Conf library.
  • If !!persist === false then OptionalConf will overwrite the getter and setter of the Conf library transparently so that it does not read from or write to the disk in any way.

Install

With NPM:

npm install --save optional-conf

With Yarn:

yarn add optional-conf

Usage

See the Usage section of the Conf library for usage information.

API

See the API section of the Conf library for API information. The only difference is the persistent boolean which can be passed in with the constructor options.

Author

bmcclure (Ben McClure)

License

Unlicense

Keywords

github

FAQs

Package last updated on 30 Jun 2017

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