Skip to content

Commit

Permalink
Convert to string automatically
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
dbrock committed Jun 17, 2015
1 parent 35888c4 commit bb3090a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regexp-quote.js
@@ -1,3 +1,3 @@
module.exports = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&")
module.exports = function (x) {
return x.toString().replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&")
}

0 comments on commit bb3090a

Please sign in to comment.