1.2.2 • Published 11 years ago

string-range v1.2.2

Weekly downloads
65,054
License
-
Repository
github
Last release
11 years ago

string-range

Check whether a string is within a range.

Example

var ranges = require('string-range')

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

//force a range inside a prefix!

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

License

MIT