@presenta/config-interpolator

1.0.46 • Public • Published

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

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'
		}]
	}]
}

*/

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.461latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.461
1.0.450
1.0.440
1.0.430
1.0.420
1.0.410
1.0.400
1.0.390
1.0.380
1.0.360
1.0.350
1.0.340
1.0.330
1.0.320
1.0.310
1.0.300
1.0.290
1.0.280
1.0.271
1.0.260
1.0.250
1.0.240
1.0.230
1.0.220
1.0.210
1.0.200
1.0.191
1.0.180
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.31
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i @presenta/config-interpolator

Weekly Downloads

5

Version

1.0.46

License

BSD-3-Clause

Unpacked Size

95.7 kB

Total Files

4

Last publish

Collaborators

  • abusedmedia