Created
September 10, 2021 13:52
-
-
Save szmeku/5eb2478ce765db1a0177a90c5167e06e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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