format-io
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/format-io package

    2.0.0 • Public • Published

    Format License NPM version Dependency Status Build Status Coverage Status

    Format size, permissions, etc.

    How to use?

    Format could be used in browser or node.

    const format = require('format-io');

    API

    size

    const size = 1024 * 1024 * 5;
    format.size(size);
    // returns
    '5.00mb'

    permissions.symbolic

    const perm = '00777';
    format.permissions.symbolic(perm);
    // returns
    'rwx rwx rwx'

    permissions.numeric

    const perm = 'rwx rwx rwx';
    format.permissions.numeric(perm);
    // returns
    '00777'

    License

    MIT

    Install

    npm i format-io

    DownloadsWeekly Downloads

    4,726

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    8.27 kB

    Total Files

    6

    Last publish

    Collaborators

    • coderaiser