ToInt8.js 247 B

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