1.0.1 • Published 4 years ago

fileparts v1.0.1

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
4 years ago

Tests

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() works

Exports a class. You could extend it for your own purposes.