lib/functions/use.js
function parseObject(obj){
  obj = obj.vals;
  for (var key in obj) {
    var nodes = obj[key].nodes[0].nodes;
    if (nodes && nodes.length) {
      obj[key] = [];
      for (var i = 0, len = nodes.length; i < len; ++i) {
        obj[key].push(convert(nodes[i]));
      }
    } else {
      obj[key] = convert(obj[key].first);
    }
  }
  return obj;

  function convert(node){
    switch (node.nodeName) {
      case 'object':
        return parseObject(node);
      case 'boolean':
        return node.isTrue;
      case 'unit':
        return node.type ? node.toString() : +node.val;
      case 'string':
      case 'literal':
        return node.val;
      default:
        return node.toString();
    }
  }
}
function parseObject(obj){
  obj = obj.vals;
  for (var key in obj) {
    var nodes = obj[key].nodes[0].nodes;
    if (nodes && nodes.length) {
      obj[key] = [];
      for (var i = 0, len = nodes.length; i < len; ++i) {
        obj[key].push(convert(nodes[i]));
      }
    } else {
      obj[key] = convert(obj[key].first);
    }
  }
  return obj;

  function convert(node){
    switch (node.nodeName) {
      case 'object':
        return parseObject(node);
      case 'boolean':
        return node.isTrue;
      case 'unit':
        return node.type ? node.toString() : +node.val;
      case 'string':
      case 'literal':
        return node.val;
      default:
        return node.toString();
    }
  }
}
function parseObject ( obj ) { obj = obj . vals ; for ( var key in obj ) { var nodes = obj [ key ] . nodes [ 0 ] . nodes ; if ( nodes && nodes . length ) { obj [ key ] = [ ] ; for ( var i = 0 , len = nodes . length ; i < len ; ++ i ) { obj [ key ] . push ( convert ( nodes [ i ] ) ) ; } } else { obj [ key ] = convert ( obj [ key ] . first ) ; } } return obj ; function convert ( node ) { switch ( node . nodeName ) { case 'object' : return parseObject ( node ) ; case 'boolean' : return node . isTrue ; case 'unit' : return node . type ? node . toString ( ) : + node . val ; case 'string' : case 'literal' : return node . val ; default : return node . toString ( ) ; } } }
Attempt to parse object node to the javascript object.

@param {Object} obj
@return {Object}
@api private
Attempt to parse object node to the javascript object .