JSPM

string-range

1.2.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 205242
  • Score
    100M100P100Q161392F
  • License MIT

check if a string is within a range

Package Exports

  • string-range

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (string-range) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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