text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var IRIToken_1 = require("../tokens/IRIToken");
  var LiteralToken_1 = require("../tokens/LiteralToken");
  var RDFLiteralToken_1 = require("../tokens/RDFLiteralToken");
  var XSD_1 = require("../utils/XSD");
  function convertValue(value) {
      if (value instanceof Date)
          return new RDFLiteralToken_1.RDFLiteralToken(value.toISOString(), IRIToken_1.getIRIToken(XSD_1.XSD.dateTime));
      if (typeof value === "object")
          return value.getSubject();
      if (typeof value === "string") {
          if (value === "UNDEF")
              return value;
          return new LiteralToken_1.LiteralToken(value);
      }
      return new LiteralToken_1.LiteralToken(value);
  }
  exports.convertValue = convertValue;
  
  //# sourceMappingURL=utils.js.map
  