fileparts
v1.0.1
Published
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.
Readme
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.
import FileParts from 'fileparts';
const fp = new FileParts('path/to/path');
fp.extname = '.there';
fp.name = 'hello';
console.info(path); // outputs "path/to/hello.there"
console.info('' + fp); // same, .toString() worksExports a class.
You could extend it for your own purposes.
