# File: search.coffee

Defined in: | lib/psd/nodes

## Variables Summary

module.exports =

      {
        childrenAtPath: function(path, opts) {
          var matches, query;
          if (opts == null) {
            opts = {};
          }
          if (!Array.isArray(path)) {
            path = path.split('/').filter(function(p) {
              return p.length > 0;
            });
          }
          path = _.clone(path);
          query = path.shift();
          matches = this.children().filter(function(c) {
            if (opts.caseSensitive) {
              return c.name === query;
            } else {
              return c.name.toLowerCase() === query.toLowerCase();
            }
          });
          if (path.length === 0) {
            return matches;
          } else {
            return _.flatten(matches.map(function(m) {
              return m.childrenAtPath(_.clone(path), opts);
            }));
          }
        }
      }

Quickly fuzzy find classes, mixins, methods, file:

- T Open fuzzy finder dialog

Control the navigation frame:

- L Toggle list view
- C Show class list
- I Show mixin list
- F Show file list
- M Show method list
- E Show extras list

You can focus and blur the search input:

- S Focus search input
- Esc Blur search input