This document describes one way to load external JavaScript modules into Postman pre-request or test scripts to augment the functionality of your own scripts.
In the collection pre-request script, export common utility functions (feel free to add additional functions for your own use case as this is a common technique for sharing code among individual requests):
// get latest version
_ = require('lodash');
// export common utility functions
pm.globals.set('util', String(() => ({