[jshint] mark hoodie as export
[minor] move helper function
[minor] formatting