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

conf

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conf - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

6

index.d.ts

@@ -76,4 +76,2 @@ /// <reference types="node"/>

/*
_Don't use this feature until [this issue](https://github.com/sindresorhus/conf/issues/92) has been fixed._
You can use migrations to perform operations to the store whenever a version is changed.

@@ -83,2 +81,4 @@

Note: The version the migrations use refers to the __project version__ by default. If you want to change this behavior, specify the `projectVersion` option.
@example

@@ -317,2 +317,3 @@ ```

@param callback - A callback function that is called on any changes. When a `key` is first set `oldValue` will be `undefined`, and when a key is deleted `newValue` will be `undefined`.
@returns A function, that when called, will unsubscribe.
*/

@@ -328,2 +329,3 @@ onDidChange<K extends keyof T>(

@param callback - A callback function that is called on any changes. When a `key` is first set `oldValue` will be `undefined`, and when a key is deleted `newValue` will be `undefined`.
@returns A function, that when called, will unsubscribe.
*/

@@ -330,0 +332,0 @@ onDidAnyChange(

{
"name": "conf",
"version": "6.2.0",
"version": "6.2.1",
"description": "Simple config handling for your app or module",
"license": "MIT",
"repository": "sindresorhus/conf",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},

@@ -61,5 +62,5 @@ "engines": {

"tempy": "^0.3.0",
"tsd": "^0.7.4",
"tsd": "^0.11.0",
"xo": "^0.24.0"
}
}

@@ -9,3 +9,2 @@ # conf [![Build Status](https://travis-ci.org/sindresorhus/conf.svg?branch=master)](https://travis-ci.org/sindresorhus/conf)

## Install

@@ -17,3 +16,2 @@

## Usage

@@ -42,3 +40,2 @@

## API

@@ -107,6 +104,4 @@

**Don't use this feature until [this issue](https://github.com/sindresorhus/conf/issues/92) has been fixed.**
You can use migrations to perform operations to the store whenever a **project version** is upgraded.
You can use migrations to perform operations to the store whenever a version is upgraded.
The `migrations` object should consist of a key-value pair of `'version': handler`. The `version` can also be a [semver range](https://github.com/npm/node-semver#ranges).

@@ -138,6 +133,8 @@

> Note: The version the migrations use refers to the **project version** by default. If you want to change this behavior, specify the [`projectVersion`](#projectVersion) option.
#### configName
Type: `string`<br>
Default: `config`
Type: `string`\
Default: `'config'`

@@ -150,3 +147,3 @@ Name of the config file (without extension).

Type: `string`<br>
Type: `string`\
Default: The `name` field in the package.json closest to where `conf` is imported.

@@ -158,3 +155,3 @@

Type: `string`<br>
Type: `string`\
Default: The `version` field in the package.json closest to where `conf` is imported.

@@ -166,3 +163,3 @@

Type: `string`<br>
Type: `string`\
Default: System default [user config directory](https://github.com/sindresorhus/env-paths#pathsconfig)

@@ -178,3 +175,3 @@

Type: `string | Buffer | TypedArray | DataView`<br>
Type: `string | Buffer | TypedArray | DataView`\
Default: `undefined`

@@ -192,4 +189,4 @@

Type: `string`<br>
Default: `json`
Type: `string`\
Default: `'json'`

@@ -202,3 +199,3 @@ Extension of the config file.

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -210,3 +207,3 @@

Type: `Function`<br>
Type: `Function`\
Default: `value => JSON.stringify(value, null, '\t')`

@@ -220,3 +217,3 @@

Type: `Function`<br>
Type: `Function`\
Default: `JSON.parse`

@@ -230,4 +227,4 @@

Type: `string`<br>
Default: `nodejs`
Type: `string`\
Default: `'nodejs'`

@@ -244,3 +241,3 @@ **You most likely don't need this. Please don't use it unless you really have to.**

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -284,3 +281,3 @@

type: `boolean`<br>
type: `boolean`\
Default: `false`

@@ -308,3 +305,3 @@

#### .get(key, [defaultValue])
#### .get(key, defaultValue?)

@@ -333,4 +330,14 @@ Get an item or `defaultValue` if the item does not exist.

Watches the given `key`, calling `callback` on any changes. When a key is first set `oldValue` will be `undefined`, and when a key is deleted `newValue` will be `undefined`.
Watches the given `key`, calling `callback` on any changes.
When a key is first set `oldValue` will be `undefined`, and when a key is deleted `newValue` will be `undefined`.
Returns a function which you can use to unsubscribe:
```js
const unsubscribe = conf.onDidChange(key, callback);
unsubscribe();
```
#### .onDidAnyChange(callback)

@@ -340,4 +347,14 @@

Watches the whole config object, calling `callback` on any changes. `oldValue` and `newValue` will be the config object before and after the change, respectively. You must compare `oldValue` to `newValue` to find out what changed.
Watches the whole config object, calling `callback` on any changes.
`oldValue` and `newValue` will be the config object before and after the change, respectively. You must compare `oldValue` to `newValue` to find out what changed.
Returns a function which you can use to unsubscribe:
```js
const unsubscribe = conf.onDidAnyChange(key, callback);
unsubscribe();
```
#### .size

@@ -361,3 +378,2 @@

## FAQ

@@ -386,3 +402,2 @@

## Related

@@ -389,0 +404,0 @@

Sorry, the diff of this file is not supported yet

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