All that range node does can be achieved with function also. It can be then adjusted and optimized by your specific needs.
See https://stackoverflow.com/questions/10756313/javascript-jquery-map-a-range-of-numbers-to-another-range-of-numbers