@jerryshell/hartrim
v1.0.2
Published
Trim HAR network log files. HAR files can grow very large because of static resources (CSS, images, fonts, etc.) that are never executed. Removing them significantly reduces file size.
Readme
hartrim
Trim HAR network log files. HAR files can grow very large because of static resources (CSS, images, fonts, etc.) that are never executed. Removing them significantly reduces file size.
Install
npm add -g @jerryshell/hartrimUsage
hartrim 'globpath'Each matched file is saved as trimmed.<basename> next to the source (network.har → trimmed.network.har).
hartrim '*.har'
hartrim 'logs/**/*.har'
hartrim path/to/file.harWhat is removed
.css- Images:
.png,.jpg,.gif,.svg,.webp - Fonts:
.woff,.woff2,.ttf .ico- Video/audio:
.webm,.mp4,.ogg,.mp3,.wav
Entries with no file extension are also removed when the response MIME type is an explicit media type (image/*, font/*, video/*, audio/*).
