docs: function extract(bag, key, def) {
      var keys,
          cur  = bag,
          i;
      if (!key) {
          return bag || {};
      }
      keys = key.split('.');
      for (i = 0; i < keys.length; i += 1) {
          if (cur && cur.hasOwnProperty(keys[i])) {
              cur = cur[keys[i]];
          } else {
              return def;
          }
      }
      return cur;
  }