# @salutejs/input-core

> Core abilities of masked-input. Usefull to create custom input processors

Latest version **2.2.0** (published 2026-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @salutejs/input-core
pnpm add @salutejs/input-core
yarn add @salutejs/input-core
bun add @salutejs/input-core
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-09-10 |
| First published | 2024-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 54 |
| Author | Nik Mostovoy |
| Maintainers | yeti-or, salute-eva |
| Keywords | masked-input, core-input, input, number-input, react-masked-input, svelte-mask-input, input-mask, credit-card, phone, phone-input |

## Links

- npm: https://www.npmjs.com/package/@salutejs/input-core
- Repository: https://github.com/xnimorz/masked-input
- Homepage: https://github.com/xnimorz/masked-input#readme
- Issues: https://github.com/xnimorz/masked-input/issues
- npm.io page: https://npm.io/package/@salutejs/input-core

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 2.2.0 (latest) — 2026-09-10
- 2.1.3 — 2025-11-17
- 2.1.2 — 2024-09-17
- 2.1.1 — 2024-09-17
- 2.1.0 — 2024-09-17

## README

## input-core

This project would help you if:

1. You don't need to create an input for user, but only formatting to show data as a plain text
2. You want to create your own compnent which will work with inputs

### Step-by-step guide:

1. Install it

   ```
   npm install --save input-core
   ```

   or

   ```
   yarn add input-core
   ```

2. import it:

   ```js
   import { createInput } from 'input-core';
   ```

3. Create an object (for example, if we want to format phone):

```js
export default function formatPhone(value, mask) {
  const input = createInput({
    value,
    mask,
  });

  return input.getVisibleValue();
}
```

4. Use it wherever you need ;)

```js
const phone = '9651112222';
...
formatPhone(phone, '+7 (000) 000 00-00'); // returns +7 (965) 111 22-22
```

# License

MIT

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