src/bindings.js
// Publishes the value currently set on the input element back to the model.
Publishes the value currently set on the input element back to the model.
Publishes the value currently set on the input element back to the model .
publish() {
    if (this.observer) {
      var value = this.formatters.reduceRight((result, declaration, index) => {
        const args = declaration.split(FORMATTER_SPLIT)
        const id = args.shift()
        const formatter = this.view.options.formatters[id]
        const processedArgs = this.parseFormatterArguments(args, index)
        if (formatter && formatter.publish) {
          result = formatter.publish(result, ...processedArgs)
        }
        return result
      }, this.getValue(this.el))
      this.observer.setValue(value)
    }
  }
publish ( ) { if ( this . observer ) { var value = this . formatters . reduceRight ( ( result , declaration , index ) => { const args = declaration . split ( FORMATTER_SPLIT ) const id = args . shift ( ) const formatter = this . view . options . formatters [ id ] const processedArgs = this . parseFormatterArguments ( args , index ) if ( formatter && formatter . publish ) { result = formatter . publish ( result , ... processedArgs ) } return result } , this . getValue ( this . el ) ) this . observer . setValue ( value ) } }
Publishes the value currently set on the input element back to the model.
Publishes the value currently set on the input element back to the model .