normalize input, fix a minor side-effect
rm unnecessary slice
check input is array & items have pattern property
test that bad input throws
minor mv throwing tests to errors.js, misc
check pattern is string or RegExp