Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ToInt16.js « 2016 « es-abstract « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5a112c237ad888aa029c6337de74d967304e06e9 (plain)
1
2
3
4
5
6
7
8
9
10
'use strict';

var ToUint16 = require('./ToUint16');

// https://www.ecma-international.org/ecma-262/6.0/#sec-toint16

module.exports = function ToInt16(argument) {
	var int16bit = ToUint16(argument);
	return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit;
};