Replaced helper function with npm module.