# string-format-obj

> Replace tokens from a string with values of an object

Latest version **1.1.1** (published 2018-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install string-format-obj
pnpm add string-format-obj
yarn add string-format-obj
bun add string-format-obj
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-01-05 |
| First published | 2015-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Stephen Sawchuk |
| Maintainers | stephenplusplus |
| Keywords | values, tokens, string, format, printf, fmt |

## Links

- npm: https://www.npmjs.com/package/string-format-obj
- Repository: https://github.com/stephenplusplus/string-format-obj
- Homepage: https://github.com/stephenplusplus/string-format-obj#readme
- Issues: https://github.com/stephenplusplus/string-format-obj/issues
- npm.io page: https://npm.io/package/string-format-obj

## 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.1.1 (latest) — 2018-01-05
- 1.1.0 — 2016-03-24
- 1.0.1 — 2015-07-31
- 1.0.0 — 2015-07-30

## README

# string-format-obj
> Replace tokens from a string with values of an object.

```sh
$ npm install --save string-format-obj
```
```js
var format = require('string-format-obj');

format('{greeting} {thing}!', {
  greeting: 'Hello',
  thing: 'world'
});
// Hello world!
```

If you want to cache the string

```js
var formatFunc = format('{greeting} {thing}!');

formatFunc({
  greeting: 'Howdy',
  thing: 'doody'
});
// Howdy doody!
```

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