# LocalStorage

Class · category: Internal

Source: https://github.com/playcanvas/editor-api/blob/4303c34bcee9a418297350899ad3a3f555526ec4/src/localstorage.ts#L6

Wrapper around native local storage

## Methods

### get

```ts
get(key: string): string | object
```

Gets a key from localStorage

**Parameters**

- `key` (`string`): The key

**Returns** `string | object`: The value

### has

```ts
has(key: string): boolean
```

Checks if key exists in local storage

**Parameters**

- `key` (`string`): The key

**Returns** `boolean`: True or false

### set

```ts
set(key: string, value: string | object): void
```

Stores a key-value to localStorage

**Parameters**

- `key` (`string`): The key
- `value` (`string | object`): The value

### unset

```ts
unset(key: string): void
```

Removes a key from localStorage

**Parameters**

- `key` (`string`): The key
