In this file (https://github.com/N8python/apolloX/blob/master/scripts/person.js), there is a takeDamage function that explains the exact methodolgy.
Damage is based off of angular velocity, and is updated every game loop. So an initial hit (high angular velocity) will deal a lot more damage then just resting your weapon on the enemy (low angular velocity).