MCPcopy
hub / github.com/esm-dev/esm.sh / endsWith

Function endsWith

server/utils.go:77–84  ·  view source on GitHub ↗

endsWith returns true if the given string ends with any of the suffixes.

(s string, suffixs ...string)

Source from the content-addressed store, hash-verified

75
76// endsWith returns true if the given string ends with any of the suffixes.
77func endsWith(s string, suffixs ...string) bool {
78 for _, suffix := range suffixs {
79 if strings.HasSuffix(s, suffix) {
80 return true
81 }
82 }
83 return false
84}
85
86// existsDir returns true if the given path is a directory.
87func existsDir(filepath string) bool {

Callers 9

esmRouterFunction · 0.85
legacyESMFunction · 0.85
buildTypesMethod · 0.85
analyzeSplittingMethod · 0.85
resolveEntryMethod · 0.85
finalizeBuildEntryMethod · 0.85
validateJSFileFunction · 0.85
transformDTSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected