UNPKG

161 BJavaScriptView Raw
1'use strict';
2var round = Math.round;
3
4module.exports = function (it) {
5 var value = round(it);
6 return value < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
7};