'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var tween = require('./tween.js');

function textConstant(value) {
  return function() {
    this.textContent = value;
  };
}

function textFunction(value) {
  return function() {
    var value1 = value(this);
    this.textContent = value1 == null ? "" : value1;
  };
}

function transition_text(value) {
  return this.tween("text", typeof value === "function"
      ? textFunction(tween.tweenValue(this, "text", value))
      : textConstant(value == null ? "" : value + ""));
}

exports.default = transition_text;
