# fmtr

> awesome string formatter

Latest version **2.0.1** (published 2026-07-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install fmtr
pnpm add fmtr
yarn add fmtr
bun add fmtr
```

## 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 | 2.0.1 |
| Published | 2026-07-28 |
| First published | 2015-12-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Cort |
| Maintainers | tcort |
| Keywords | format, string, placeholder, substitution |

## Links

- npm: https://www.npmjs.com/package/fmtr
- Repository: https://github.com/tcort/fmtr
- Issues: https://github.com/tcort/fmtr/issues
- npm.io page: https://npm.io/package/fmtr

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.18.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

- 2.0.1 (latest) — 2026-07-28
- 2.0.0 — 2025-10-29
- 1.1.4 — 2023-04-17
- 1.1.3 — 2021-04-02
- 1.1.2 — 2019-07-12
- 1.1.1 — 2019-01-08
- 1.1.0 — 2017-05-15
- 1.0.5 — 2017-04-05
- 1.0.4 — 2016-07-19
- 1.0.3 — 2016-04-16
- 1.0.2 — 2016-01-16
- 1.0.1 — 2016-01-01
- 1.0.0 — 2015-12-10

## README

# fmtr

Awesome string formatting using shell style place holders.

## Installation

    npm install --save fmtr

## API

### fmtr(format, obj)

Parameters:

* `format` string with `${propertyName}` placeholder(s) where `propertyName` is the name of a property of `obj`
* `obj` an object containing values to substitute into the format string.

Returns:

* string

## Example

    "use strict";

    var fmtr = require('fmtr');

    var user = {
        username: 'alice',
        spouse: 'bob',
        enemy: 'eve'
    };

    console.log(fmtr('${username} is married to ${spouse} and hates ${enemy}', user));

    // prints "alice is married to bob and hates eve"

## Testing

    npm test

## License

See [LICENSE.md](https://github.com/tcort/fmtr/blob/master/LICENSE.md)

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