# @presenta/config-interpolator

> Presenta Config Interpolator

Latest version **1.0.46** (published 2024-06-16) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @presenta/config-interpolator
pnpm add @presenta/config-interpolator
yarn add @presenta/config-interpolator
bun add @presenta/config-interpolator
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.46 |
| Published | 2024-06-16 |
| First published | 2021-10-30 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 1 |
| Unpacked size | 93.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | abusedmedia |

## Links

- npm: https://www.npmjs.com/package/@presenta/config-interpolator
- Repository: https://github.com/presenta-software/presenta-config-interpolator
- Homepage: https://www.presenta.cc
- Issues: https://github.com/presenta-software/presenta-config-interpolator/issues
- npm.io page: https://npm.io/package/@presenta/config-interpolator

## Dependencies (1)

- [handlebars](https://npm.io/package/handlebars.md) ^4.7.8

## Recent versions

- 1.0.46 (latest) — 2024-06-16
- 1.0.45 — 2024-06-09
- 1.0.44 — 2024-06-09
- 1.0.43 — 2024-06-09
- 1.0.42 — 2024-06-09
- 1.0.41 — 2024-06-09
- 1.0.40 — 2024-06-09
- 1.0.39 — 2024-06-09
- 1.0.38 — 2022-11-06
- 1.0.36 — 2022-04-24
- 1.0.35 — 2022-04-10
- 1.0.34 — 2022-04-02
- 1.0.33 — 2022-04-02
- 1.0.32 — 2022-04-02
- 1.0.31 — 2022-03-31
- … 31 more at https://npm.io/package/@presenta/config-interpolator/versions

## README

## Presenta Config Interpolator

This function accepts a data config and a template config and return a merged version useful to create a PRESENTA Lib document.

### Usage

```js
import { interpolate } from '@presenta/config-interpolator

const data = {
	myText: 'Hello',
	myText[color]: 'red', //
	myText[coords][top]: 20, //
	myText[hidden][hidden]: true
}

const templateConfig = {
	scenes:[{
		blocks:[{
			type: 'text',
			ukey: 'myText',
			content: ''
		}]
	}]
}

const config = await interpolate(data, templateConfig)

/*
const data = {
	myText: 'Hello'
}

const templateConfig = {
	scenes:[{
		blocks:[{
			type: 'text',
			ukey: 'myText',
			content: 'Hello'
		}]
	}]
}

*/
```

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