Fork me on GitHub
#clojure-spec
<
2017-08-19
>
potetm01:08:24

So, I would like to do something like #"[abc]{0,9}d?" in a spec regular expression.

potetm01:08:41

Is there a recommended way of doing a {0,9} quantifier?

potetm01:08:11

Or do I just have to check the conformed value in a separate predicate?

ghadi03:08:11

spec/& is what you want @potetm

misha07:08:41

how do I conform strings with spec? I don't? Or should I just split string into some data structure first, and then proceed with spec? an example would be a csv file (let's pretend there is no parser for csv)

seantempesta09:08:07

Is there a tool to generate documentation based on Spec’ed functions?

pwrflx14:08:08

hi! is it possible to share specs between clojure and clojurescript?

scaturr14:08:02

it sure is!

scaturr14:08:13

as long as the underlying predicates work on both platforms

scaturr14:08:03

you can use reader conditionals to include the cljs version

pwrflx15:08:24

thanks, I'll look into this.

pwrflx08:08:42

thanks again, the example in your project worked nicely for me!

scaturr21:08:35

glad it helped 🙂

didibus22:08:10

Is there a variant of s/def that also returns the spec?

tbaldridge22:08:57

if it did the spec returned would have the same name that you just gave it....so I'm not sure how that helps much

tbaldridge22:08:07

(s/def ::foo ...) would just return ::foo

didibus22:08:43

I'm thinking what get-spec returns