dist/tulipan.cjs.js
/**
 * A directive links a DOM element with a piece of data,
 * which is the result of evaluating an expression.
 * It registers a watcher with the expression and calls
 * the DOM update function when a change is triggered.
 *
 * @param {Object} descriptor
 *                 - {String} name
 *                 - {Object} def
 *                 - {String} expression
 *                 - {Array<Object>} [filters]
 *                 - {Object} [modifiers]
 *                 - {Boolean} literal
 *                 - {String} attr
 *                 - {String} arg
 *                 - {String} raw
 *                 - {String} [ref]
 *                 - {Array<Object>} [interp]
 *                 - {Boolean} [hasOneTime]
 * @param {TurpialCore} vm
 * @param {Node} el
 * @param {TurpialCore} [host] - transclusion host component
 * @param {Object} [scope] - tp-for scope
 * @param {Fragment} [frag] - owner fragment
 * @constructor
 */
A directive links a DOM element with a piece of data,
which is the result of evaluating an expression.
It registers a watcher with the expression and calls
the DOM update function when a change is triggered.


A directive links a DOM element with a piece of data which is the result of evaluating an expression . It registers a watcher with the expression and calls the DOM update function when a change is triggered .
function Directive(descriptor, vm, el, host, scope, frag) {
  this.vm = vm;
  this.el = el;
  this.descriptor = descriptor;
  this.name = descriptor.name;
  this.expression = descriptor.expression;
  this.arg = descriptor.arg;
  this.modifiers = descriptor.modifiers;
  this.filters = descriptor.filters;
  this.literal = this.modifiers && this.modifiers.literal;
  this._locked = false;
  this._bound = false;
  this._listeners = null;
  this._host = host;
  this._scope = scope;
  this._frag = frag;
  if ('development' !== 'production' && this.el) {
    this.el._TurpialCore_directives = this.el._TurpialCore_directives || [];
    this.el._TurpialCore_directives.push(this);
  }
}
function Directive ( descriptor , vm , el , host , scope , frag ) { this . vm = vm ; this . el = el ; this . descriptor = descriptor ; this . name = descriptor . name ; this . expression = descriptor . expression ; this . arg = descriptor . arg ; this . modifiers = descriptor . modifiers ; this . filters = descriptor . filters ; this . literal = this . modifiers && this . modifiers . literal ; this . _locked = false ; this . _bound = false ; this . _listeners = null ; this . _host = host ; this . _scope = scope ; this . _frag = frag ; if ( 'development' !== 'production' && this . el ) { this . el . _TurpialCore_directives = this . el . _TurpialCore_directives || [ ] ; this . el . _TurpialCore_directives . push ( this ) ; } }
A directive links a DOM element with a piece of data,
 which is the result of evaluating an expression.
A directive links a DOM element with a piece of data which is the result of evaluating an expression .
// copy descriptor properties // private // link context // store directives on node in dev mode