# @skyrim-platform/console-util

> TypeScript library for the ConsoleUtil Skyrim modding utility

Latest version **1.3.3** (published 2021-12-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @skyrim-platform/console-util
pnpm add @skyrim-platform/console-util
yarn add @skyrim-platform/console-util
bun add @skyrim-platform/console-util
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2021-12-23 |
| First published | 2021-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | mrowrpurr |
| Keywords | skyrim, skyrim platform |

## Links

- npm: https://www.npmjs.com/package/@skyrim-platform/console-util
- Repository: https://github.com/skyrim-platform/console-util
- Issues: https://github.com/skyrim-platform/console-util/issues
- npm.io page: https://npm.io/package/@skyrim-platform/console-util

## Dependencies (1)

- [@skyrim-platform/skyrim-platform](https://npm.io/package/@skyrim-platform/skyrim-platform.md) ^2.3.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.3.3 (latest) — 2021-12-23
- 1.3.2 — 2021-12-23

## README

## `@skyrim-platform/console-util`

(Unofficial) TypeScript library for the ConsoleUtil Skyrim modding utility

- ConsoleUtil on GitHub: https://github.com/Ryan-rsm-McKenzie/ConsoleUtilSSE
- ConsoleUtil on Nexus: https://www.nexusmods.com/skyrimspecialedition/mods/24858

## Getting Started

You can find an example Skyrim Platform plugin with documentation on how to get started using this library: https://github.com/skyrim-platform/example-plugin-using-libraries

> Papyrus source code conversion to TypeScript originally generated using [Papyrus-2-Typescript](https://github.com/CarlosLeyvaAyala/Papyrus-2-Typescript)

## Example

```ts
import { on, printConsole } from '@skyrim-platform/skyrim-platform'
import { GetSelectedReference } from '@skyrim-platform/console-util'

// Whenever anything is selected in the ~ Skyrim console, it prints out that object's name in the console
on('update', () => {
    const selectedReference = GetSelectedReference()
    if (selectedReference) {
        let name = selectedReference.getName()
        if (! name) name = selectedReference.getDisplayName()
        if (! name) name = selectedReference.getBaseObject()!.getName()
        printConsole(`Selected reference: ${name}`)
    }
})
```

---
_Source: https://npm.io/package/@skyrim-platform/console-util · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
