Fixed width format
See original GitHub issueFor progress bars, it would be nice to have an output format that is always the same width. E.g. a possible six character wide format:
1 -> 0.0 kB
10 -> 0.0 kB
100 -> 0.1 kB
1000 -> 1.0 kB
10000 -> 10 kB
100000 -> 100 kB
1000000 -> 1.0 MB
10000000 -> 10 MB
100000000 -> 100 MB
1000000000 -> 1.0 GB
10000000000 -> 10 GB
100000000000 -> 100 GB
1000000000000 -> 1.0 TB
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Fixed Width Text File Definition - Softinterface
Fixed width text files are special cases of text files where the format is specified by column widths, pad character and left/right alignment....
Read more >Why are fixed-width file formats still in use? - Stack Overflow
Fixed Width is for speed and minimal resource consumption. It can be more tedious to setup than XML. Ensuring that all systems know...
Read more >Fixed width format - Easy Data Transform
Fixed width format is used for exchanging tabular data between programs. It is often associated with legacy systems, but is also used for...
Read more >Fixed-length format files - IBM
Fixed-length format files use ordinal positions, which are offsets to identify where fields are within the record. There are no field delimiters.
Read more >Importing fixed-width files - PANDA Project
Fixed-width is a file format where data is arranged in columns, but instead of those columns being delimited by a certain character (as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gaborcsardi for your case, another option is to use filesize instead, you can set
symbols
there. A simple change ofB
toB
andpadStart
should make your example possible.I switched to it because I need precision https://github.com/sindresorhus/pretty-bytes/issues/57 and it kinda works fine.
Maybe instead we could just make add a
rightAlign
option.