metosin/malli

m/-tuple-transformer is broken in many ways

Open

#578 aberto em 21 de nov. de 2021

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Clojure (237 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (1.724 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

;; ok
(m/decode
  [:tuple string? string?]
  []
  (mt/string-transformer))
; => []

;; fail
(m/decode
  [:tuple keyword? string?]
  []
  (mt/string-transformer))
; => [nil]

;; megafail
(m/decode
  [:tuple string? keyword?]
  []
  (mt/string-transformer))
; =throws=> Execution error (IndexOutOfBoundsException) at malli.core/-update (core.cljc:194).

Guia do colaborador