Update utils.js

Added truncate function for numbers