How to move an object using mouse just like the swipe in iOS?

I am making a multiplatform game. iOs and windows. but my problem is, i want to simulate iOS swipes using my mouse. example: if i swipe going up, my character will jump. if i swipe to left, my character goes left. and if i swipe right, my character goes right.
i need a c# script. but if you prefer javascript, it will also help.

First example on this page:

shows how to move an object in response to a finger move.

Second example on this page:

shows how to rotate and object in response to a mouse move.