shExpMatch.d.ts 736 B

1234567891011121314151617181920212223
  1. /**
  2. * Returns true if the string matches the specified shell
  3. * expression.
  4. *
  5. * Actually, currently the patterns are shell expressions,
  6. * not regular expressions.
  7. *
  8. * Examples:
  9. *
  10. * ``` js
  11. * shExpMatch("http://home.netscape.com/people/ari/index.html", "*\/ari/*")
  12. * // is true.
  13. *
  14. * shExpMatch("http://home.netscape.com/people/montulli/index.html", "*\/ari/*")
  15. * // is false.
  16. * ```
  17. *
  18. * @param {String} str is any string to compare (e.g. the URL, or the hostname).
  19. * @param {String} shexp is a shell expression to compare against.
  20. * @return {Boolean} true if the string matches the shell expression.
  21. */
  22. export default function shExpMatch(str: string, shexp: string): boolean;
  23. //# sourceMappingURL=shExpMatch.d.ts.map