National Poetry Month

    fileparts

    1.0.1 • Public • Published

    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.

    Keywords

    none

    Install

    npm i fileparts

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    Apache-2.0

    Unpacked Size

    14.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • samthor