Liking cljdoc? Tell your friends :D

yuhrao.data-cloak.core.string


allclj

(all s)

Obscure the whole string. Useful for passwords

Example:

(dc.string/all "1234567890") ;;=> "**********"
Obscure the whole string. Useful for passwords

Example:
```clojure
(dc.string/all "1234567890") ;;=> "**********"
```
raw docstring

emailclj

(email s)
Obscure an email. Examples:
- some.email@gmail.com -> so******il@gmail.com
- small@gmail.com -> s****@gmail.com
- bob@gmail.com -> b**@gmail.com
raw docstring

offsetclj

(offset s opts)

Given a string, obscure all the string content from start+start-offset to end-end-offset> opts:

  • :start: amount of chars at the beginning of the string to not be obscured
  • :end: amount of chars at the end of the string to not be obscured
(dc.string/offset "1234567890" {:start 3 :end 4}) ;;=> "123***4890")
Given a string, obscure all the string content from `start`+`start-offset` to `end`-`end-offset`>
opts:
- `:start`: amount of chars at the beginning of the string to not be obscured
- `:end`: amount of chars at the end of the string to not be obscured

```clojure
(dc.string/offset "1234567890" {:start 3 :end 4}) ;;=> "123***4890")
```

raw docstring

phoneclj

(phone s)

Obscure a phone number. It removes phone number's specific special characters such as ()+ and white spaces

Examples:

  • +55 (11) 91234-1234 -> 55119****1234
  • (11) 91234-1234 -> 119****1234
  • 91234-1234 -> *****1234
Obscure a phone number. It removes phone number's specific special characters
such as `()+` and white spaces

Examples:
- +55 (11) 91234-1234 -> 55119****1234
- (11) 91234-1234 -> 119****1234
- 91234-1234 -> *****1234
raw docstring

symmetric-offsetclj

(symmetric-offset s n)

Same as offset but :start and :end are equal

Same as `offset` but `:start` and `:end` are equal
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close