Tiny package for a file object which has properties like extname
, dirname
, and so on which can be modified independently of a path as a whole.
Install as fileparts
.
; const fp = 'path/to/path';fpextname = '.there';fpname = 'hello'; console; // outputs "path/to/hello.there"console; // same, .toString() works
Exports a class
.
You could extend it for your own purposes.