Describe the options in README.md
authorJoe Littlejohn <joelittlejohn@gmail.com>
Fri, 2 Jun 2017 10:48:49 +0000 (11:48 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Jun 2017 10:48:49 +0000 (11:48 +0100)
README.md

index 118d3fccd406acfa69fdba89c3a38f09ec36ca66..dfadc21615464d9d0c882f3e134af47a0f8eb645 100644 (file)
--- a/README.md
+++ b/README.md
@@ -28,6 +28,14 @@ user> (frak/pattern ["skill" "skills" "skull" "skulls"])
 #"sk(?:[ui]lls?)"
 ```
 
+## Options
+Frak's `pattern` function can accept an options map as its second argument, the available options are:
+
+* `:capture?` - boolean (default false), whether rendered regex should create capture groups for each match
+* `:escape-chars` - vector (default see [`frak/metacharacters`](https://github.com/noprompt/frak/blob/3c22d9b33646ca4bc681a5746ac0d11fd06e579b/src/cljx/frak.cljx#L54)), characters to escape when rendering a regular expression.
+* `:exact?` - boolean (default false), whether the rendered regex should only produces matches when the entire input string matches.
+* `:whole-words?` - boolean (default false), whether the rendered regex should match only whole words (word boundary at both ends of the match) in the input string.
+
 ## Command line usage
 
 frak can be used from the command line with either Leiningen or NodeJS.