* returns a path string from an object. * @param {PathObject} pathObject
(pathObject)
| 56 | * @param {PathObject} pathObject |
| 57 | */ |
| 58 | format(pathObject) { |
| 59 | let { root, dir, ext, name, base } = pathObject; |
| 60 | |
| 61 | if (base || !ext.startsWith(".")) { |
| 62 | ext = ""; |
| 63 | if (base) name = ""; |
| 64 | } |
| 65 | |
| 66 | dir = dir || root; |
| 67 | |
| 68 | if (!dir.endsWith("/")) dir += "/"; |
| 69 | |
| 70 | return dir + (base || name) + ext; |
| 71 | }, |
| 72 | |
| 73 | /** |
| 74 | * The path.isAbsolute() method determines if path is an absolute path. |
nothing calls this directly
no outgoing calls
no test coverage detected