open-index/open-npm huggingface dataset:
npm package: @lvcabral/memory-fs
Description: A simple in-memory filesystem. Holds data in a javascript object.
Author: Tobias Koppers @sokra
Latest version: 0.5.1

# memory-fs

> FORK INFO: Created to support `brs-engine` project.

A simple in-memory filesystem. Holds data in a javascript object.

``` javascript
var MemoryFileSystem = require("memory-fs");
var fs = new MemoryFileSystem(); // Optionally pass a javascript object

fs.mkdirpSync("/a/test/dir");
fs.writeFileSync("/a/test/dir/file.txt", "Hello World");
fs.readFileSync("/a/test/dir/file.txt"); // returns Buffer("Hello World")

// Async variants too
fs.unlink("/a/test/dir/file.txt", function(err) {
	// ...
});

fs.readdirSync("/a/test"); // returns ["dir"]
fs.statSync("/a/test/dir").isDirectory(); // returns true
fs.rmdirSync("/a/test/dir");

fs.mkdirpSync("C:\\use\\windows\\style\\paths");
```

## License

Copyright (c) 2012-2014 Tobias Koppers

MIT (http://www.opensource.org/licenses/mit-license.php)
npm package: @lvce-editor/assert
Description: runtime type assertions for catching errors early
Author: Lvce Editor
Latest version: 1.5.1

# Assert

Runtime type assertions for catching errors early

## Install

```sh
npm install @lvce-editor/assert
```

## Usage

```js
import * as Assert from '@lvce-editor/assert'

const someFunction = (value) => {
  Assert.array(value)
}
```
npm package: @lvce-editor/clipboard-process
Description: ClipBoard Process
Author: Lvce Editor
Latest version: 1.1.0

# ClipBoard Process

ClipBoard Process

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/clipboard-process)
npm package: @lvce-editor/command
Description: Command module
Author: Lvce Editor
Latest version: 2.0.0

# Command

Command module.

## Install

```sh
npm install @lvce-editor/command
```

## Usage

```js
import * as Command from '@lvce-editor/command'

const fn = () => {
  return 'abc'
}

Command.register('command-name', fn)

await Command.execute('command-name')
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/command)
npm package: @lvce-editor/completion-worker
Description: Web Worker for the completion widget in Lvce Editor
Author: Lvce Editor
Latest version: 3.0.0

# Completion Worker

> A Web Worker for the completion functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/completion-worker.git &&
cd completion-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/debug-worker
Description: Debug Worker
Author: Lvce Editor
Latest version: 4.0.0

# debug worker

Web Worker for the debug functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/debug-worker.git &&
cd debug-worker &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/debug-worker)
npm package: @lvce-editor/embeds-worker
Description: Web Worker to manage electron webcontent views in Lvce Editor
Author: Lvce Editor
Latest version: 4.1.0

# Embeds Worker

Web Worker for the embeds functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/embeds-worker.git &&
cd embeds-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/error-worker
Description: Error Worker
Author: Lvce Editor
Latest version: 2.4.0

# Error Worker

Web Worker for the providing error code source maps and frames in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/error-worker.git &&
cd error-worker &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/error-worker)
npm package: @lvce-editor/extension-detail-view
Description: Extension Detail View Worker
Author: Lvce Editor
Latest version: 7.1.0

# Extension Detail View

Webworker for the extension detail view in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/extension-detail-view.git &&
cd extension-detail-view &&
npm ci &&
npm test
```

## Credits

The extension detail view is based on VSCode's extension detail view.
npm package: @lvce-editor/extension-host-sub-worker
Description: Webworker for the extension host functionality in Lvce Editor.
Latest version: 3.14.0

# Extension Host Worker

Webworker for the extension host functionality in Lvce Editor.

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/extension-host-worker)
npm package: @lvce-editor/extension-search-view
Description: Extension Search View Worker
Author: Lvce Editor
Latest version: 7.3.0

# Extension Search View

Webworker for the extension search view in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/extension-search-view.git &&
cd extension-search-view &&
npm ci &&
npm test
```
npm package: @lvce-editor/file-search-worker
Description: Web Worker for the file search functionality in LVCE Editor.
Author: Lvce Editor
Latest version: 7.6.0

# File Search Worker

Web Worker for the file search functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/file-search-worker-worker.git &&
cd file-search-worker-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/file-system-process
Description: File System Process
Author: Lvce Editor
Latest version: 5.0.0

# File System Process

File System Process

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/file-system-process)
npm package: @lvce-editor/file-system-worker
Description: File System Worker
Author: Lvce Editor
Latest version: 5.1.0

# File System Worker

Web Worker for the file system functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/file-system-worker.git &&
cd file-system-worker &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/file-system-worker)
npm package: @lvce-editor/fuzzy-search
Description: Fuzzy search implementation
Author: Lvce Editor
Latest version: 2.0.1

# @lvce-editor/fuzzy-search

Fuzzy search implementation based on VSCode's implementation of the Needleman–Wunsch algorithm.

## Install

```sh
npm install @lvce-editor/fuzzy-search
```

## Usage

```js
import * as FuzzySearch from '@lvce-editor/fuzzy-search'

const pattern = 'fd'
const word = 'font-display'

const result = FuzzySearch.fuzzySearch(pattern, word) // [0, 1, 5, 6] highlight chars 0-1 (f) and 5-6 (d)
```

## Credits

This project is based on VSCode's implementation of the Needleman–Wunsch algorithm.
npm package: @lvce-editor/import-script
Description: Dynamically import a module with helpful error messages in case the import fails
Author: Lvce Editor
Latest version: 1.1.0

# import-script

Dynamically import a module with helpful error messages in case the import fails.

## Install

```sh
npm install @lvce-editor/import-script
```

## Usage

```js
import { importScript } from '@lvce-editor/importScript'

const otherFunction = () => {
  throw new Error(`oops`)
}

const module = await import('./not-found.js')

//
//
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/import-script)
npm package: @lvce-editor/ipc
Description: Inter Process Communication for Lvce Editor
Author: Lvce Editor
Latest version: 15.0.0

# Lvce Editor Ipc

Inter Process Communiction for use in Lvce Editor.

### Usage

```js
import { IpcParentWithElectronUtilityProcess } from '@lvce-editor/ipc'

const rawIpc = await IpcParentWithElectronUtilityProcess.create({
  path: '/test/utility-process.js',
})

const ipc = IpcParentWithElectronUtilityProcess.wrap(rawIpc)

ipc.send({
  jsonrpc: '2.0',
  method: 'readFile',
  params: ['/test/file.txt'],
})
```
npm package: @lvce-editor/json-rpc
Description: JsonRpc implementation
Author: Lvce Editor
Latest version: 8.0.0

# @lvce-editor/json-rpc

JsonRpc implementation.

## Install

```sh
npm install @lvce-editor/json-rpc
```

## Usage

```js
import * as JsonRpc from '@lvce-editor/json-rpc'

const ipc = {
  send(message) {
    JsonRpc.resolve(message.id, message.params[0], message.params[1])
  },
}

await JsonRpc.invoke(ipc, 'add', 1, 2) // returns 3
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/json-rpc)
npm package: @lvce-editor/jsonc-parser
Description: Parse jsonc files into json
Author: Lvce Editor
Latest version: 1.5.0

# jsonc-parser

Parse jsonc files into json.

## Install

```sh
npm install @lvce-editor/jsonc-parser
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/jsonc-parser)

## Credits

This project is based on [node-jsonc-parser](https://github.com/microsoft/node-jsonc-parser) by Microsoft (License MIT)
npm package: @lvce-editor/main-process
Description: The `main-process` is a NodeJS process that runs Electron.
Author: LVCE Editor
Latest version: 5.0.0

# main-process

The `main-process` is a NodeJS process that runs Electron.

- `main-process` is created when the Electron application is launched
- `main-process` can create Windows using Apis from Electron.
- `main-process` spawns `shared-process`
- `main-process` and `shared-process` can communicate via ipc

## Profiling the main process

```sh
killall electron &&
npx electron --wait src/profile.js
```

This will create a `profile.cpuprofile` file, which can be loaded inside the chrome devtools performance panel.
npm package: @lvce-editor/measure-memory
Description: Measure WebWorker memory usage using Playwright.
Latest version: 3.1.0

# Measure Memory

Measure WebWorker memory usage using Playwright.

## Install

```sh
npm install @lvce-editor/measure-memory
```

## Usage

```js
import { measureMemory } from '@lvce-editor/measure-memory'
import { playwrightPath, threshold, workerPath } from './config.ts'

const main = async () => {
  await measureMemory({
    playwrightPath: 'path-to-playwright.js',
    workerPath: 'path-to-webworker.js',
    threshold: 300_000,
  })
}

main()
```
npm package: @lvce-editor/output-view
Description: Output View Worker
Author: Lvce Editor
Latest version: 2.2.0

# Output View

WebWorker for the output view functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/output-view.git &&
cd output-view &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/output-view)
npm package: @lvce-editor/package-extension
Description: Utility package for packaging an extension into a tar.br file.
Author: Lvce Editor
Latest version: 3.2.0

# @lvce-editor/package-extension

Utility package for packaging an extension into a tar.br file.

## Usage

```js
import { copyFiles, packageExtension } from '@lvce-editor/package-extension'
import path, { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'

const __dirname = dirname(fileURLToPath(import.meta.url))
const root = path.join(__dirname, '..')

await copyFiles({
  root,
  files: ['README.md', 'extension.json', 'languageConfiguration.json', 'src'],
})

await packageExtension({
  highestCompression: true,
  inDir: join(root, 'dist'),
  outFile: join(root, 'extension.tar.br'),
})
```
npm package: @lvce-editor/pretty-error
Description: Create user friendly error messages and code frames for errors
Author: Lvce Editor
Latest version: 2.0.0

# Pretty Error

Create user friendly error messages and code frames for errors.

## Install

```sh
npm install @lvce-editor/pretty-error
```

## Usage

```js
import * as PrettyError from '@lvce-editor/pretty-error'

const error = new TypeError(`x is not a function`)

const prettyError = PrettyError.prepare(error)
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/pretty-error)
npm package: @lvce-editor/preview-process
Description: Preview Process
Author: Lvce Editor
Latest version: 11.0.0

# Preview Process

Preview server for iframes. Iframes are running on a different port than the application for better security.

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/preview-process)
npm package: @lvce-editor/preview-sandbox-worker
Description: Preview SandBox Worker
Author: Lvce Editor
Latest version: 2.3.0

# Preview SandBox Worker

WebWorker for the Preview functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/preview-sandbox-worker.git &&
cd preview-sandbox-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/problems-view
Description: Problems View Worker
Author: Lvce Editor
Latest version: 1.18.0

# Problems View

WebWorker for the problems view functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/problems-view.git &&
cd problems-view &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/problems-view)
npm package: @lvce-editor/quick-pick-worker
Description: Web Worker for the QuickPick functionality in LVCE Editor.
Author: Lvce Editor
Latest version: 2.1.0

# Quick Pick Worker

Web Worker for the QuickPick functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/quick-pick-worker.git &&
cd quick-pick-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/references-view
Description: References View
Author: Lvce Editor
Latest version: 2.5.0

# References View

Web Worker for the References View in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/references-view.git &&
cd references-view &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/references-view)
npm package: @lvce-editor/ripgrep
Description: A module for using ripgrep in a Node project
Author: Lvce Editor
Latest version: 4.1.0

# ripgrep

A module for using [ripgrep](https://github.com/BurntSushi/ripgrep/) in a Node project.

Same as [vscode-ripgrep](https://github.com/microsoft/vscode-ripgrep), but fixes the github rate limiting error `Downloading ripgrep failed: Error: Request failed: 403` by downloading the files directly instead of also using the github rest api.

## Install

```
$ npm install @lvce-editor/ripgrep
```

## Usage

```js
import { rgPath } from '@lvce-editor/ripgrep'
import { spawn } from 'node:child_process'

const childProcess = spawn(rgPath, ['abc', '.'], {
  stdio: 'inherit',
})
```

## Environment Variables

- `RIPGREP_PREBUILT_BINARIES_MIRROR`: Specify a custom mirror URL for downloading ripgrep prebuilt binaries. This is useful for users in regions where GitHub releases are slow or inaccessible, or for organizations using internal mirrors.
  - **Default**: `https://github.com/microsoft/ripgrep-prebuilt/releases/download`
  - **Example**: `export RIPGREP_PREBUILT_BINARIES_MIRROR=https://your-mirror.com/ripgrep-prebuilt/releases/download`
  - **Note**: The mirror URL should follow the same path structure as the official repository, with binaries available at `{mirror-url}/{version}/ripgrep-{version}-{target}`

## Credits

This project is very much based on https://github.com/microsoft/vscode-ripgrep by Microsoft.
npm package: @lvce-editor/rpc
Description: Rpc implementation
Author: Lvce Editor
Latest version: 6.4.0

# @lvce-editor/rpc

Rpc implementation.

## Install

```sh
npm install @lvce-editor/rpc
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/rpc)
npm package: @lvce-editor/rpc-registry
Description: Rpc Registry
Author: Lvce Editor
Latest version: 9.17.0

# Rpc Registry

> Module for managing Rpc instances.

## Contributing

```sh
git clone git@github.com:lvce-editor/rpc-registry.git &&
cd rpc-registry &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/rpc-registry)
npm package: @lvce-editor/search-process
Description: Search Process
Author: Lvce Editor
Latest version: 13.1.0

# Search Process

Search process using ripgrep

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/search-process)
npm package: @lvce-editor/server
Description: Run LVCE Editor as a server.
Author: Lvce Editor
Latest version: 0.78.0

# @lvce-editor/server

The server process is a nodejs process that

- runs a static file server that serves the html, css and javascript to the browser
- can accept WebSocket connections, it sends the WebSocket connection to `shared-process`
- spawns the `shared-process`
npm package: @lvce-editor/settings-view
Description: Explorer Worker
Author: Lvce Editor
Latest version: 2.8.0

# Settings View

WebWorker for the Settings View functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/settings-view.git &&
cd settings-view &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/settings-view)
npm package: @lvce-editor/simple-browser-view
Description: Simple Browser View
Author: Lvce Editor
Latest version: 2.0.0

# Simple Browser View

Web Worker for the simple browser view functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/simple-browser-view.git &&
cd simple-browser-view &&
npm ci &&
npm test
```
npm package: @lvce-editor/source-action-worker
Description: Web Worker for the source actions widget
Author: Lvce Editor
Latest version: 1.4.0

# Source Action Worker

> A Web Worker for the source action functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/source-action-worker.git &&
cd source-action-worker &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/source-action-worker)
npm package: @lvce-editor/source-control-worker
Description: Source Control Worker
Author: Lvce Editor
Latest version: 3.0.0

# Source Control Worker

Web Worker for the source control functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/source-control-worker.git &&
cd source-control-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/terminal-worker
Description: Terminal Worker
Author: Lvce Editor
Latest version: 1.2.0

# Terminal Worker

Webworker for the terminal functionality in Lvce Editor.

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/terminal-worker)
npm package: @lvce-editor/test-syntax-highlighting
Description: Utility package for testing syntax highlighting functions for the lvce-editor.
Latest version: 1.3.0

# @lvce-editor/test-syntax-highlighting

Utility package for testing syntax highlighting functions for the lvce-editor.

## Install

```
$ npm install @lvce-editor/test-syntax-highlighting
```

## Usage

Create an extension manifest:

```json
{
  "id": "language-basics-xyz",
  "languages": [
    {
      "id": "xyz",
      "extensions": [".xyz"],
      "tokenize": "src/tokenizeXyz.js"
    }
  ]
}
```

Then create the tokenize function

```js
// src/tokenizeXyz.js
export const TokenType = {
  Text: 1,
}

export const TokenMap = {
  [TokenType.Text]: 'Text',
}

export const initialLineState = {
  state: 1,
  tokens: [],
}

export const hasArrayReturn = true

export const tokenizeLine = (line) => {
  const tokens = [TokenType.Text, line.length]
  return {
    state: 1,
    tokens,
  }
}
```

Then add sample code into `test/cases/sample-code.xyz`

```
sample xyz code
```

Then a test script to your package json file

```json
{
  "scripts": {
    "test": "test-syntax-highlighting"
  }
}
```

Then run `npm test` which will create `test/baselines/sample-code.txt`. That file contains the tokens that were generated by the tokenizeLine function for `test/cases/sample-code.xyz`:

```
Text
```

## Successful tests

When the tests succeed, you will get output similar to this:

```
> test-syntax-highlighting

1 test passed in 4ms
```

## Failing tests

When a test fails, you will get output similar to this:

```
mismatch sample-code
1 test failed, 0 tests passed
```

When that happens, you need can either

- adjust your tokenize function to output the tokens specified in `test/baselines/sample-code.txt` or
- delete `test/baselines/sample-code.txt` and rerun `npm test` to regenerate the expected tokens in `test/baselines/sample-code.txt`
npm package: @lvce-editor/test-with-playwright
Description: CLI tool for running Playwright tests
Author: Lvce Editor
Latest version: 15.1.0

# @lvce-editor/test-with-playwright

## Usage

```json
{
  "scripts": {
    "e2e": "node ./node_modules/@lvce-editor/test-with-playwright/bin/test-with-playwright.js --only-extension=. --test-path=./e2e"
  }
}
```

```js
test('sample.hello-world', async () => {
  const sideBar = Locator('#SideBar')
  await expect(sideBar).toBeVisible()
})
```
npm package: @lvce-editor/text-measurement-worker
Description: Web Worker for the completion widget in Lvce Editor
Author: Lvce Editor
Latest version: 1.12.0

# Text Measurement Worker

> A Web Worker for the completion functionality in Lvce Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/text-measurement-worker.git &&
cd text-measurement-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/text-search-worker
Description: Text Search Worker
Author: Lvce Editor
Latest version: 6.5.0

# Text Search Worker

Web Worker for the text search functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/text-search-worker.git &&
cd text-search-worker &&
npm ci &&
npm test
```
npm package: @lvce-editor/title-bar-worker
Description: Title Bar Worker
Author: Lvce Editor
Latest version: 3.21.0

# Title Bar Worker

Webworker for the title bar functionality in LVCE Editor.

## Contributing

```sh
git clone git@github.com:lvce-editor/title-bar-worker.git &&
cd text-search-worker &&
npm ci &&
npm test
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/title-bar-worker)
npm package: @lvce-editor/verror
Description: Improve error messages by adding additional context to an error
Author: Lvce Editor
Latest version: 1.7.0

# VError

Improve error messages by adding additional context to an error.

## Install

```sh
npm install @lvce-editor/verror
```

## Usage

```js
import { VError } from '@lvce-editor/verror'

const otherFunction = () => {
  throw new Error(`oops`)
}

const doSomething = () => {
  try {
    const data = otherFunction()
    return data
  } catch (error) {
    throw new VError(error, `failed to get data`)
  }
}
```

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/verror)
npm package: @lvce-editor/viewlet-registry
Description: Viewlet Registry
Author: Lvce Editor
Latest version: 4.1.0

# Viewlet Registry

Viewlet Registry

## Gitpod

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/viewlet-registry)
npm package: @lvce-editor/web-socket-server
Description: Wrapper module for `ws` for use in Lvce Editor.
Author: Lvce Editor
Latest version: 2.1.0

# Web Socket Server

Wrapper module for `ws` for use in Lvce Editor.

### Usage

```js
import * as WebSocketServer from "@lvce-editor/web-socket-server";

// receive request object and socket from a parent
// process and upgrade the socket to a websocket
await WebSocketServer.handleUpgrade(request, socket);
```