This can now be moved into `lib/util.js`