Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_.type(variable) #32

Open
russplaysguitar opened this issue Jan 15, 2013 · 0 comments
Open

_.type(variable) #32

russplaysguitar opened this issue Jan 15, 2013 · 0 comments

Comments

@russplaysguitar
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant