function parsePatterns(patternOrPatterns, args) {
    const patterns = toArray(patternOrPatterns)
    const hasPlaceholder = patterns.some(pattern => ARGS_PATTERN.test(pattern))

    return hasPlaceholder ? applyArguments(patterns, args) : patterns
}
Parse patterns.
In parsing process, it replaces argument placeholders (such as `{1}`) by arguments.

@param {string|string[]} patternOrPatterns - Patterns to run.
     A pattern is a npm-script name or a Glob-like pattern.
@param {string[]} args - Arguments to replace placeholders.
@returns {string[]} Parsed patterns.