MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / extname

Function extname

src/utils/Url.js:56–60  ·  view source on GitHub ↗

* * @param {String} url * returns the extension of the path, from the last occurrence of the . (period) * character to end of string in the last portion of the path. * If there is no . in the last portion of the path, or if there are no . * characters other than the first character of the

(url)

Source from the content-addressed store, hash-verified

54 * @returns {String}
55 */
56 extname(url) {
57 const name = this.basename(url);
58 if (name) return path.extname(name);
59 else return null;
60 },
61 /**
62 * Join all arguments together and normalize the resulting path.
63 * @param {...string} pathnames

Callers

nothing calls this directly

Calls 1

basenameMethod · 0.80

Tested by

no test coverage detected