Permalink
Browse files

Handle object destructuring assignments in getFullName

  • Loading branch information...
1 parent dcece8f commit a60bd085acf0943fa1616eb247a24b6589f4139c @grncdr committed Apr 30, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/helpers.coffee
View
@@ -25,6 +25,9 @@ exports.getFullName = (variable) ->
name = variable.base.value
if variable.properties.length > 0
name += '.' + (p.name.value for p in variable.properties).join('.')
+ if not name
+ names = variable.base.properties.map((p) -> p.base.value)
+ return "{#{names.join(', ')}}"
return name
exports.getAttr = (node, path) ->

0 comments on commit a60bd08

Please sign in to comment.