braces = (input, options = {}) => {
  let output = [];

  if (Array.isArray(input)) {
    for (let pattern of input) {
      let result = braces.create(pattern, options);

      if (Array.isArray(result)) {
        output.push(...result);
      } else {
        output.push(result);
      }
    }
  } else {
    output = [].concat(braces.create(input, options));
  }

  if (options && options.expand === true && options.nodupes === true) {
    output = [...new Set(output)];
  }

  return output;
}
Expand the given pattern or create a regex-compatible string.

```js
const braces = require('braces');
console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
```
@param {String} `str`
@param {Object} `options`
@return {String}
@api public