---
title: "@vltpkg/dot-prop: Reference — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/dot-prop/reference"
image: "https://docs.vlt.io/og/client/api-reference/dot-prop/reference"
lang: "en"
---

# Reference

## Type Aliases

### Arg

```ts
type Arg = 
  | ArrayArg
  | ObjectArg;
```

Defined in: index.ts:3

---

### ArrayArg

```ts
type ArrayArg = unknown[];
```

Defined in: index.ts:1

---

### Character

```ts
type Character = 
  | typeof Characters[keyof typeof Characters]
  | string & object;
```

Defined in: index.ts:23

---

### ObjectArg

```ts
type ObjectArg = Record<PropertyKey, unknown>;
```

Defined in: index.ts:2

---

### Part

```ts
type Part = typeof Parts[keyof typeof Parts];
```

Defined in: index.ts:33

## Variables

### Characters

```ts
const Characters: object;
```

Defined in: index.ts:15

#### Type declaration

| Name           | Type  | Default value |
| -------------- | ----- | ------------- |
| `Dot`          | `"."` | '.'           |
| `Empty`        | `""`  | ''            |
| `Escape`       | "\\"  | '\\'          |
| `LeftBracket`  | `"["` | '\['          |
| `RightBracket` | `"]"` | ']'           |

---

### Parts

```ts
const Parts: object;
```

Defined in: index.ts:26

#### Type declaration

| Name       | Type         | Default value |
| ---------- | ------------ | ------------- |
| `Index`    | `"index"`    | 'index'       |
| `IndexEnd` | `"indexEnd"` | 'indexEnd'    |
| `Property` | `"property"` | 'property'    |
| `Start`    | `"start"`    | 'start'       |

## Functions

### del()

```ts
function del(object, path): boolean
```

Defined in: index.ts:275

#### Parameters

| Parameter | Type                                                                        |
| --------- | --------------------------------------------------------------------------- |
| `object`  | [`Arg`](https://docs.vlt.io/client/api-reference/dot-prop/reference.md#arg) |
| `path`    | `string`                                                                    |

#### Returns

`boolean`

---

### get()

```ts
function get(
   ogObject, 
   path, 
   defaultValue?): unknown
```

Defined in: index.ts:211

#### Parameters

| Parameter       | Type                                                                        |
| --------------- | --------------------------------------------------------------------------- |
| `ogObject`      | [`Arg`](https://docs.vlt.io/client/api-reference/dot-prop/reference.md#arg) |
| `path`          | `string`                                                                    |
| `defaultValue`? | `unknown`                                                                   |

#### Returns

`unknown`

---

### has()

```ts
function has(object, path): boolean
```

Defined in: index.ts:302

#### Parameters

| Parameter | Type                                                                        |
| --------- | --------------------------------------------------------------------------- |
| `object`  | [`Arg`](https://docs.vlt.io/client/api-reference/dot-prop/reference.md#arg) |
| `path`    | `string`                                                                    |

#### Returns

`boolean`

---

### set()

```ts
function set<T>(
   object, 
   path, 
   value): T
```

Defined in: index.ts:246

#### Type Parameters

| Type Parameter                                                                            |
| ----------------------------------------------------------------------------------------- |
| `T` _extends_ [`Arg`](https://docs.vlt.io/client/api-reference/dot-prop/reference.md#arg) |

#### Parameters

| Parameter | Type      |
| --------- | --------- |
| `object`  | `T`       |
| `path`    | `string`  |
| `value`   | `unknown` |

#### Returns

`T`
