ToInt8.js 242 B

12345678910
  1. 'use strict';
  2. var ToUint8 = require('./ToUint8');
  3. // https://262.ecma-international.org/6.0/#sec-toint8
  4. module.exports = function ToInt8(argument) {
  5. var int8bit = ToUint8(argument);
  6. return int8bit >= 0x80 ? int8bit - 0x100 : int8bit;
  7. };