MCPcopy
hub / github.com/mkdocs/mkdocs / is_javascript

Method is_javascript

mkdocs/structure/files.py:515–517  ·  view source on GitHub ↗

Return True if file is a JavaScript file.

(self)

Source from the content-addressed store, hash-verified

513 return not (self.is_documentation_page() or self.is_static_page())
514
515 def is_javascript(self) -> bool:
516 """Return True if file is a JavaScript file."""
517 return self.src_uri.endswith(('.js', '.javascript', '.mjs'))
518
519 def is_css(self) -> bool:
520 """Return True if file is a CSS file."""

Callers 10

test_md_fileMethod · 0.95
test_md_file_nestedMethod · 0.95
test_md_index_fileMethod · 0.95
test_static_fileMethod · 0.95
test_media_fileMethod · 0.95
test_javascript_fileMethod · 0.95
test_css_fileMethod · 0.95
javascript_filesMethod · 0.80

Calls

no outgoing calls

Tested by 9

test_md_fileMethod · 0.76
test_md_file_nestedMethod · 0.76
test_md_index_fileMethod · 0.76
test_static_fileMethod · 0.76
test_media_fileMethod · 0.76
test_javascript_fileMethod · 0.76
test_css_fileMethod · 0.76