russplaysguitar / UnderscoreCF

An UnderscoreJS port for Coldfusion. Functional programming library.
http://russplaysguitar.github.com/UnderscoreCF/
MIT License
89 stars 38 forks source link

_.type(variable) #32

Open russplaysguitar opened 11 years ago

russplaysguitar commented 11 years ago

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:

_.type() should return the same values in both cfml engines.