---
title: JavaScript SDK 2.0.0
summary: null
url: >-
  https://www.fastly.com/documentation/reference/changes/2023/05/javascript-sdk-2.0.0
---

## Changed

- Object Store renamed to KV Store ([#476](https://github.com/fastly/js-compute-runtime/issues/476))

We have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.

You will need to update your code to use the new class name and module name.

Below is the change that would need to be made for the imported module name:

```diff
- 
+ 
```

And this is the change that would need to be made for constructing an instance of the class:

```diff
- const store = new ObjectStore('my-store');
+ const store = new KVStore('my-store');
```

Here is a full example of migrating an application from ObjectStore to KVStore:

```diff
/// <reference types="@fastly/js-compute" />

- 
+ 

async function app(event) {
- const files = new ObjectStore('files');
+ const files = new KVStore('files');

await files.put('hello', 'world')

const entry = await files.get('hello')

return new Response(await entry.text())
}

addEventListener("fetch", (event) => event.respondWith(app(event)))
```
