index.js
function(key, val) {
    if (arguments.length === 1) {
      if (typeof key === 'string') {
        if (key.indexOf('.') === -1) {
          return this.cache.data[key];
        }
        if (lazy.isGlob(key)) {
          this.compose('data')(key, val);
          return this;
        }
        return lazy.get(this.cache.data, key);
      }
    }

    if (typeof key === 'object') {
      var args = [].slice.call(arguments);
      key = [].concat.apply([], args);
      this.visit('data', key);
      return this;
    }

    lazy.set(this.cache.data, key, val);
    this.emit('data', key, val);
    return this;
  }
function(key, val) {
    if (arguments.length === 1) {
      if (typeof key === 'string') {
        if (key.indexOf('.') === -1) {
          return this.cache.data[key];
        }
        if (lazy.isGlob(key)) {
          this.compose('data')(key, val);
          return this;
        }
        return lazy.get(this.cache.data, key);
      }
    }

    if (typeof key === 'object') {
      var args = [].slice.call(arguments);
      key = [].concat.apply([], args);
      this.visit('data', key);
      return this;
    }

    lazy.set(this.cache.data, key, val);
    this.emit('data', key, val);
    return this;
  }
function ( key , val ) { if ( arguments . length === 1 ) { if ( typeof key === 'string' ) { if ( key . indexOf ( '.' ) === - 1 ) { return this . cache . data [ key ] ; } if ( lazy . isGlob ( key ) ) { this . compose ( 'data' ) ( key , val ) ; return this ; } return lazy . get ( this . cache . data , key ) ; } } if ( typeof key === 'object' ) { var args = [ ] . slice . call ( arguments ) ; key = [ ] . concat . apply ( [ ] , args ) ; this . visit ( 'data' , key ) ; return this ; } lazy . set ( this . cache . data , key , val ) ; this . emit ( 'data' , key , val ) ; return this ; }
Load data onto `app.cache.data`

```js
console.log(app.cache.data);
//=> {};

app.data('a', 'b');
app.data({c: 'd'});
console.log(app.cache.data);
//=> {a: 'b', c: 'd'}
```
@name .data
@param {String|Object} `key` Key of the value to set, or object to extend.
@param {any} `val`
@return {Object} Returns the instance of `Template` for chaining
@api public
Load data onto app . cache . data