Skip to content

markwylde/allowed-characters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

allowed-characters

Build Status GitHub code size in bytes GitHub package.json version GitHub js-semistandard-style

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"'

About

Check if a string only has allowed characters in it

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors