Return a list of named props, where name refers to `name` in `[filter:name]`.

@param   {string}    pattern   Pattern to get props from
@return  {Array}               Array of named props
function getNamedProps(pattern) {
  var regex = /\[(\w+):(\w+)?]/g;
  var props = [];
  var i = 0;

  pattern.replace(regex, function () {
    props.push((arguments.length <= 2 ? undefined : arguments[2]) || i++);
    return "";
  });

  return props;
}