# @ytsaurus/interface-helpers

> JavaScript helpers for YTsaurus platform UI

Latest version **1.4.0** (published 2026-11-19) · 0 weekly downloads

## Install

```sh
npm install @ytsaurus/interface-helpers
pnpm add @ytsaurus/interface-helpers
yarn add @ytsaurus/interface-helpers
bun add @ytsaurus/interface-helpers
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2026-11-19 |
| First published | 2023-02-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 42.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Maintainers | robot-dataui-npm, robot-ytsaurus-npm |

## Links

- npm: https://www.npmjs.com/package/@ytsaurus/interface-helpers
- Repository: https://github.com/ytsaurus/ytsaurus-ui.git#main
- Homepage: https://github.com/ytsaurus/ytsaurus-ui/tree/main#readme
- Issues: https://github.com/ytsaurus/ytsaurus-ui/issues
- npm.io page: https://npm.io/package/@ytsaurus/interface-helpers

## Recent versions

- 1.4.0 (latest) — 2026-11-19
- 1.3.0 — 2026-06-08
- 1.2.0 — 2026-04-16
- 1.1.1 — 2025-12-19
- 1.1.0 — 2025-12-17
- 1.0.2 — 2025-09-18
- 0.3.1 — 2024-07-25
- 0.3.0 — 2024-02-01
- 0.2.0 — 2023-07-27
- 0.1.1 — 2023-02-20
- 0.1.0 — 2023-02-20

## README

# interface-helpers

JavaScript helpers for YTsaurus platform UI

## Install

`npm install --save @ytsaurus/interface-helpers`

## Example

hammer.format\['Bytes'\](123456789) ----> "117.74 MiB"

## Localization

Formatters use English by default and support Russian. Set the language when
initializing the application and whenever its language changes:

```js
const {setLang} = require('@ytsaurus/interface-helpers/lib/i18n');
const {format} = require('@ytsaurus/interface-helpers/lib/hammer');

setLang('ru');
format.NumberPerSecond(1250, {measure: 'строк'}); // '1 250 строк/с'
format.NumberPerSecond(12.5, {measure: 'Мбит', digits: 1}); // '12.5 Мбит/с'
format.BytesPerSecond(2048); // '2.00 КиБ/с'

setLang('en');
format.NumberPerSecond(1250, {measure: 'rows'}); // '1 250 rows/s'
```

`measure` is a display label supplied by the caller. Translate it in the
application, for example `{measure: i18n('rows')}`. `NumberPerSecond` localizes
the per-second suffix without translating the label or converting the value.
The value must already be expressed in the supplied unit.

The language also controls the labels in `Bytes`, `TimeDuration`, `vCores`, and
`RowsPerSecond`. Numeric formatting, scale selection, and handling of missing
values remain unchanged.

`setLang` is synchronous and only switches the library's translations. The
application configures date localization separately through the shared
`@gravity-ui/date-utils` dependency: await `settings.loadLocale(lang)`, then call
`settings.setLocale(lang)`.

---
_Source: https://npm.io/package/@ytsaurus/interface-helpers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
