Mouse movement to impulse

Can I transform mouse movement into impulse? I mean I know it could be done if I write the proper code, what I am asking is if this functionality is already coded in the engine.
Let’s talk only 2D: if I pickup a physics object and throw it to the right slowly (move the mouse slowly before releasing the button) I want the object to get a slow impulse to the right.
If I move the mouse quickly to the left and release I want the object to be thrown accordingly to the left and so on…