Skip to content

Instantly share code, notes, and snippets.

@szmeku
Created September 10, 2021 13:52
Show Gist options
  • Save szmeku/5eb2478ce765db1a0177a90c5167e06e to your computer and use it in GitHub Desktop.
Save szmeku/5eb2478ce765db1a0177a90c5167e06e to your computer and use it in GitHub Desktop.
const har = require('./poolstamp.json');
const fs = require('fs');
const entries = har.log.entries
.filter(el => el._initiator.type !== 'preflight')
.filter(el => el.request.url.match(/(rack-design|add-racks)/gi))
const entriesJSON = JSON.stringify(entries, null, 2);
fs.writeFile('entries.json', entriesJSON, (err) => {
if (err) throw err;
console.log('Data written to file');
});
module.exports = {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment