{"repo":"sindresorhus/conf","free":true,"listed":false,"github":"https://github.com/sindresorhus/conf","clone":"git clone https://github.com/sindresorhus/conf.git","description":"Simple config handling for your app or module","language":"TypeScript","stars":1347,"topics":["config","configuration-management","preferences","storage","json-schema","json","command-line","node-module","npm-package"],"license":"MIT","category":"cli-tools","readme_excerpt":"conf Simple config handling for your app or module All you have to care about is what to persist. This module will handle all the dull details like where and how. It does not support multiple processes writing to the same store. \\ I initially made this tool to let command-line tools persist some data. If you need this for Electron, check out electron-store instead. [!NOTE] This is not a database. The entire JSON file is read and written on every change, so it's best suited for small data like user settings. For large data, use SQLite or similar. Install Usage Or create a subclass. API Changes are written to disk atomically, so if the process crashes during a write, it will not corrupt the existing config. Conf(options?) Returns a new instance. options Type: object defaults Type: object Default values for the config items. [!NOTE] The values in defaults will overwrite the default key in the schema option. schema Type: object JSON Schema to validate your config data. This will be the properties object of the JSON schema. That is, define schema as an object where each key is the name of your data's property and each value is a JSON schema used to validate that property. Example: [!NOTE] The default value will be overwritten by the defaults option if set. rootSchema Type: object Top-level properties for the schema, excluding properties field. Example: ajvOptions Type: object Options passed to AJV. Under the hood, the JSON Schema validator ajv is used to validate your config. We u","default_branch":null,"files":null,"tree":[],"storefront":"/r/sindresorhus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sindresorhus/conf/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}