MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / ht

Function ht

botasaurus/string_utils.py:83–104  ·  view source on GitHub ↗

Short alias for hide_text_with_asterisk(). Args: data: The input data, which can be a dictionary, list, or string. exceptKeys (list): A list of keys to exclude from hiding in dictionaries. Returns: The data with the text hidden using asterisks.

(data, exceptKeys=[])

Source from the content-addressed store, hash-verified

81 return data
82
83def ht(data, exceptKeys=[]):
84 """
85 Short alias for hide_text_with_asterisk().
86
87 Args:
88 data: The input data, which can be a dictionary, list, or string.
89 exceptKeys (list): A list of keys to exclude from hiding in dictionaries.
90
91 Returns:
92 The data with the text hidden using asterisks.
93
94 Examples:
95 ht("password")
96 Output: "p*s*w**d"
97
98 ht({"username": "john", "password": "secret"}, exceptKeys=["username"])
99 Output: {"username": "john", "password": "s*c**t"}
100
101 ht(["apple", "banana", "cherry"])
102 Output: ["a*p*e", "b*n**a", "c*e**y"]
103 """
104 return hide_text_with_asterisk(data, exceptKeys)

Callers

nothing calls this directly

Calls 1

hide_text_with_asteriskFunction · 0.85

Tested by

no test coverage detected