node module extending typeof functionality