MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / safe_name

Function safe_name

tools/embed_js.py:32–36  ·  view source on GitHub ↗

Make *name* safe to use as a JavaScript variable name.

(name)

Source from the content-addressed store, hash-verified

30
31
32def safe_name(name):
33 """
34 Make *name* safe to use as a JavaScript variable name.
35 """
36 return '_'.join(re.split(r'[@/-]', name)).upper()
37
38
39def prep_package(web_backend_path, pkg):

Callers 2

gen_embedded_linesFunction · 0.85
build_mpljsFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…