Extend security masked data protocol

This commit is contained in:
Gheorghe Pinzaru 2020-06-09 17:56:49 +03:00
parent f5675b640d
commit df9062475c
No known key found for this signature in database
GPG Key ID: C9A094959935A952
1 changed files with 12 additions and 0 deletions

View File

@ -11,6 +11,18 @@
(deftype MaskedData [data]
Object
(toString [_] "******")
ICounted
(-count [^js this]
(count (.-data this)))
IEquiv
(-equiv [this other]
(if (instance? MaskedData other)
(= (unmask this)
(unmask other))
false))
Unmaskable
(unmask [^js this]
(.-data this)))