@nx-js/attributes-middleware

1.1.0 • Public • Published

The attributes middleware

The attributes middleware extends native attributes with dynamic behavior and provides a way to add custom attributes.

  • name: attributes
  • direct middleware dependencies: observe
  • all middleware dependencies: observe
  • type: component or content middleware
  • ignores: text nodes
  • docs

Installation

npm install @nx-js/attributes-middleware

Usage

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

component()
  .useOnContent(observe)
  .useOnContent(attributes)
  .register('attributes-comp')
<attributes-comp>
  <span @hidden="!show">Hello World!</span>
</animated-comp>

/@nx-js/attributes-middleware/

    Package Sidebar

    Install

    npm i @nx-js/attributes-middleware

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • solkimicreb