An implementation of a minSize option, proposed here:
32
This allows filtering the output to only show languages with a resulting size greater than what the user inputs.
This is done by moving the results of these too-small languages to an other key and deleting the original results.
This may be too ad-hoc - for instance, maybe this should be a CLI-only option and the actual data isn't changed? Is the other key needed, or not?
For this reason this feature is not being committed straight to main and will sit as a pull request for proposal.
Feedback would be welcome on the best implementation for this feature.
Example console output with this feature implemented:
C:\Users\Nixinova\Documents\GitHub\Linguist>node bin -a .
Analysed 47,664 B from 20 files with linguist-js
Language analysis results:
1. █ TypeScript 79.57% 37,924 B
2. █ JavaScript 10.85% 5,172 B
3. █ JSON 9.01% 4,296 B
4. █ INI 0.57% 272 B
Total: 47,664 B
C:\Users\Nixinova\Documents\GitHub\Linguist>node bin -a . --minSize 5KB
Analysed 47,664 B from 20 files with linguist-js
Language analysis results:
1. █ TypeScript 79.57% 37,924 B
2. █ JavaScript 10.85% 5,172 B
3. █ other 9.58% 4,568 B
Total: 47,664 B
An implementation of a
minSize
option, proposed here:32
This allows filtering the output to only show languages with a resulting size greater than what the user inputs.
This is done by moving the results of these too-small languages to an
other
key and deleting the original results.This may be too ad-hoc - for instance, maybe this should be a CLI-only option and the actual data isn't changed? Is the
other
key needed, or not?For this reason this feature is not being committed straight to main and will sit as a pull request for proposal.
Feedback would be welcome on the best implementation for this feature.
Example console output with this feature implemented: