MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / pathBasename

Function pathBasename

lib/utils.mjs:98–106  ·  view source on GitHub ↗
(fullpath)

Source from the content-addressed store, hash-verified

96 * @return {string}
97 */
98export function pathBasename (fullpath) {
99 let bname = ''
100 if (fullpath) {
101 bname = (fullpath.lastIndexOf('/') === fullpath.length - 1)
102 ? ''
103 : path.basename(fullpath)
104 }
105 return bname
106}
107
108/**
109 * Checks to see whether a string has the given suffix.

Callers 2

linksHandlerFunction · 0.90
utils-test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected