Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cloudcmd/formatify

cloudcmd867MIT2.0.1

format directory content

format, file, directory, size, name, date

readme

Formatify License NPM version Build Status Coverage Status

Format directory content received by readify.

Install

npm i @cloudcmd/formatify --save

API

formatify(files)

  • files - files list

Examples

const files = [{
    name: 'sortify.js',
    size: 3538,
    date,
    owner: 0,
    mode: 33_204,
}, {
    name: 'readify.js',
    size: 1629,
    date: '2016-11-21T13:37:55.275Z',
    owner: 0,
    mode: 33_204,
}];

formatify(files);
// returns
[{
    name: 'formatify.js',
    size: '3.46kb',
    date: '12.01.2017',
    owner: 0,
    mode: 'rw- rw- r--',
}, {
    name: 'readify.js',
    size: '1.59kb',
    date: '12.01.2017',
    owner: 0,
    mode: 'rw- rw- r--',
}];
  • Sortify - sort directory content by name, size, date
  • Readify - read directory content with file attributes: size, date, owner, mode

License

MIT

changelog

2024.08.16, v2.0.1

fix:

  • 1d6d2fa readme: badge

2024.08.16, v2.0.0

feature:

  • d553100 formatify: drop support of node < 18
  • 4ea5c5d @cloudcmd/formatify: try-catch v3.0.1
  • 6909522 @cloudcmd/formatify: nodemon v3.1.4
  • a599cd9 @cloudcmd/formatify: mkdirp v3.0.1
  • 5603d20 @cloudcmd/formatify: madrun v10.1.0
  • 39fc066 @cloudcmd/formatify: eslint-plugin-putout v22.10.0
  • 62c1eeb @cloudcmd/formatify: eslint v9.9.0
  • d28af1b @cloudcmd/formatify: c8 v10.1.2
  • 1a70dc4 @cloudcmd/formatify: supertape v10.7.2
  • 368c9d6 @cloudcmd/formatify: putout v36.0.4
  • 8fcc028 (package) madrun v5.0.1
  • 1cd1d3e (package) eslint-plugin-putout v3.0.0
  • e38f11b (package) putout v7.3.1

2019.10.11, v1.0.4

feature:

  • (package) shortdate v2.0.0

2019.09.20, v1.0.3

feature:

  • (package) format-io v2.0.0
  • (package) eslint v6.4.0
  • (package) nyc v14.1.1

2018.06.12, v1.0.2

feature:

  • (package) format-io v1.0.1
  • (package) nyc v12.0.2
  • (package) redrun v6.0.0
  • (package) eslint-plugin-node v6.0.0

2018.02.02, v1.0.1

fix:

  • (package) keywords: sort -> format