Skip to content

An NX middleware, responsible for dynamic and one-time text interpolation.

License

Notifications You must be signed in to change notification settings

nx-js/interpolate-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

An NX middleware, responsible for dynamic and one-time text interpolation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published