docs: function check( dir, basename, flg ) {
  	var fpath,
  		exts,
  		len,
  		i;
  
  	if ( flg ) {
  		exts = extensions();
  		len = exts.length;
  		for ( i = 0; i < len; i++ ) {
  			fpath = basename + exts[ i ];
  			fpath = resolve( dir, fpath );
  			if ( exists( fpath ) ) {
  				return fpath;
  			}
  		}
  	} else {
  		fpath = resolve( dir, basename );
  		if ( exists( fpath ) ) {
  			return fpath;
  		}
  	}
  	return null;
  }