Skip to content

dominictarr/string-range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

string-range

Check whether a string is within a range.

Example

var ranges = require('string-range')

ranges.satisfies('hello', {min: 'a', max: 'z'})
=> true
ranges.satisfies('Hello', {min: 'a', max: 'z'})
=> false

//force a range inside a prefix!

ranges.satisfies('TYPE~key', ranges.prefix({min:'a', max:'z'}, 'TYPE')
=> true

min and max are alaises for start and end.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published