@nx-js/interpolate-middleware

1.0.1 • Public • Published

The interpolate middleware

The interpolate middleware is responsible for dynamic and one-time text interpolation from the state into the HTML view.

  • name: interpolate
  • middleware dependencies: observe
  • all middleware dependencies: observe
  • type: content middleware
  • ignores: element nodes
  • docs

Installation

npm install @nx-js/interpolate-middleware

Usage

const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const interpolate = require('@nx-js/interpolate-middleware')

component()
  .useOnContent(observe)
  .useOnContent(interpolate)
  .register('interpolate-comp')
<interpolate-comp>
  <p>${name} is ${age | unit 'year'} old</p>
</interpolate-comp>

Package Sidebar

Install

npm i @nx-js/interpolate-middleware

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • solkimicreb