# @types/set-value

> TypeScript definitions for set-value

Latest version **4.0.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/set-value
pnpm add @types/set-value
yarn add @types/set-value
bun add @types/set-value
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.3 |
| Published | 2023-11-07 |
| First published | 2018-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/set-value
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/set-value
- npm.io page: https://npm.io/package/@types/set-value

## Recent versions

- 4.0.3 (latest) — 2023-11-07
- 4.0.1 (ts3.6) — 2021-07-06
- 4.0.0 (ts3.5) — 2021-05-21
- 2.0.0 (ts2.4) — 2018-02-22
- 4.0.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/set-value`

# Summary
This package contains type definitions for set-value (https://github.com/jonschlinkert/set-value).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/set-value.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/set-value/index.d.ts)
````ts
export = set;

// Technically, everything will fall to the last overload,
// but the first one can be useful for signature help.

/**
 * @param object The object to set `value` on
 * @param path The of the property to set.
 * @param value The value to set on `object[prop]`
 * @param [options]
 */

declare function set<T extends object, K extends keyof T>(object: T, path: K, value: T[K], options?: set.Options): void;
declare function set(object: object, path: set.InputType, value: any, options?: set.Options): void;

declare namespace set {
    interface Options {
        /**
         * Do not split properties that include a `/`.
         * By default, set-value assumes that properties with a `/` are not intended to be split.
         * This option allows you to disable default behavior.
         * Note that this option cannot be used if `options.separator` is set to `/`.
         * @default true
         */
        preservePaths?: boolean | undefined;
        /**
         * Custom separator to use for splitting object paths.
         * @default `.`
         */
        separator?: string | undefined;
        /**
         * Custom `.split()` function to use.
         */
        split?: SplitFunc | undefined;
        /**
         * Allows you to update plain object values, instead of overwriting them.
         * @default  `undefined`
         */
        merge?: boolean | MergeFunc | undefined;
    }

    type InputType = string | symbol | ReadonlyArray<string | symbol>;

    type MergeFunc = <TObject, TSource>(object: TObject, source: TSource) => TObject & TSource;

    type SplitFunc = (input: string, options?: Options) => string;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Daniel Rosenwasser](https://github.com/DanielRosenwasser), and [Piotr Błażejewicz](https://github.com/DanielRosenwasser).

---
_Source: https://npm.io/package/@types/set-value · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
