There are so many places in Underscore that have to check multiple types in order to determine what type a variable really is. For instance, some variables pass both isStruct() and isObject(), or isArray() and isXmlDoc(). This is compounded by the fact that Railo 4 and CF10 don't respond the same.
It would be great to replace all of those weird logical statements with clearer statements using _.type().
_.type() should return a string. Possible values:
simpleValue (boolean, string or numeric)
array
struct
object
query
xml
function (closure, custom function, or anonymous function)
_.type() should return the same values in both cfml engines.
There are so many places in Underscore that have to check multiple types in order to determine what type a variable really is. For instance, some variables pass both
isStruct()
andisObject()
, orisArray()
andisXmlDoc()
. This is compounded by the fact that Railo 4 and CF10 don't respond the same.It would be great to replace all of those weird logical statements with clearer statements using
_.type()
._.type()
should return a string. Possible values:_.type()
should return the same values in both cfml engines.