docs: function reverse(obj) {
      if (!is_1.isValue(obj))
          return null;
      // Reverse an array.
      if (is_1.isArray(obj))
          return obj.reverse();
      // Reverse a string.
      if (is_1.isString(obj)) {
          var i = obj.toString().length;
          var tmpStr = '';
          while (i--)
              tmpStr += obj[i];
          return tmpStr;
      }
      // Reverse an object.
      var result = {};
      for (var p in obj) {
          if (is_1.isObject(obj[p]))
              continue;
          result[obj[p]] = p;
      }
      return result;
  }