fs.extension
fs.extension
Function
Returns the path extension.
Syntax
fs(path).extension()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| String | Returns the extension without the dot. |
Example
file = fs('/var/log/app.log') result = file.extension() // Output: log print result
Notes
- Returns an empty string if the path has no extension.