Pre-Script and Post-Script like Postman extension for Burpsuite
With extension, you can import JavaScript code and it will be run like Pre-script and Post-script in Postman. For detailed usage please go to Wiki