MCPcopy Index your code
hub / github.com/bugy/script-server / strip

Function strip

src/utils/string_utils.py:29–45  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

27
28
29def strip(value):
30 if value is None:
31 return value
32
33 if isinstance(value, list):
34 return [strip(x) for x in value]
35
36 if isinstance(value, dict):
37 result = {}
38 for k, v in value.items():
39 result[strip(k)] = strip(v)
40 return result
41
42 if isinstance(value, str):
43 return value.strip()
44
45 return value
46
47
48def is_blank(value):

Callers 9

__init__Method · 0.90
from_jsonFunction · 0.90
_prepare_allowed_usersFunction · 0.90
_parse_admin_usersFunction · 0.90
_parse_history_usersFunction · 0.90
_parse_code_editor_usersFunction · 0.90
_resolve_file_extensionsFunction · 0.90
_resolve_excluded_filesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected