string-range

check if a string is within a range

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
string-range
211.2.211 years ago11 years agoMinified + gzip package size for string-range in KB

Readme

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