JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9529
  • Score
    100M100P100Q126626F
  • License MIT

Format size, permissions

Package Exports

  • format-io

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (format-io) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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