# sprintf-ts

> TypeScript utils for sprintf

Latest version **0.1.0** (published 2018-11-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install sprintf-ts
pnpm add sprintf-ts
yarn add sprintf-ts
bun add sprintf-ts
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-11-19 |
| First published | 2018-11-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 0 |
| Unpacked size | 146.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dumitru Cantea |
| Maintainers | mitica |
| Keywords | sprintf, sprintf-ts, utils |

## Links

- npm: https://www.npmjs.com/package/sprintf-ts
- Repository: https://github.com/Mitica/sprintf-ts
- Homepage: https://github.com/Mitica/sprintf-ts#readme
- Issues: https://github.com/Mitica/sprintf-ts/issues
- npm.io page: https://npm.io/package/sprintf-ts

## Recent versions

- 0.1.0 (latest) — 2018-11-19

## README

# sprintf-ts

sprintf TypeScript utils.

## API


### parseParams(format: string): TsParam[]

Parse params from a sprintf format.

#### Usage

```ts
import { parseParams } from 'sprintf-ts'

let params = parseParams('Hello %1$s, %s, %2$s, %s');
// = [{ name: 'p1', type: ['string'] }, { name: 'p2', type: ['string'] }]

params = parseParams('Hello %(name)s');
// = [{ name: 'p1', type: ['{ name: string }'] }]

```

## Types

```ts
type TsParam = {
    name: string
    type: string[]
}
```

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