allowed-characters Throw an error if a string contains unallowed characters Installation npm i --save allowedcharacters Usage allowedCharacters -> allowed -> string -> string|error 1. Correct characters allowedCharacters('123', '123') === '123'; 2. Incorrect characters allowedCharacters('123', '1234')// throws error: 'contained unallowed character "4"'