From 2f40e86f9314e398f7ce04db4c97cf49d07a7161 Mon Sep 17 00:00:00 2001 From: Wycheproof Team Date: Tue, 13 Aug 2019 18:13:03 -0700 Subject: [PATCH] LSC: Delete uses of goog.isDefAndNotNull, goog.isDef, goog.isNull, goog.isString, goog.isBoolean, and goog.isNumber. These functions are all trivial one-liners that inline to clearer code that is nearly as small (and in some cases even smaller) than the function call. See go/lsc-goog-isdef Tested: TAP --sample ran all affected tests and none failed http://test/OCL:263067138:BASE:263057012:1565671265213:a988ea45 NOKEYCHECK=True PiperOrigin-RevId: 263257614 GitOrigin-RevId: b9879442a887349646d064825c5c86ce904ab6f9 --- javascript/BigInteger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/BigInteger.js b/javascript/BigInteger.js index 514ce6a..906641a 100644 --- a/javascript/BigInteger.js +++ b/javascript/BigInteger.js @@ -70,7 +70,7 @@ wycheproof.BigInteger.fromHex = function(s) { */ wycheproof.BigInteger.prototype.toBase64Url = function(optValue) { var bytes = this.toByteArray(); - if (goog.isDef(optValue) && optValue > bytes.length) { + if (optValue !== undefined && optValue > bytes.length) { var addingZeros = new Array(optValue-bytes.length).fill(0); bytes = addingZeros.concat(bytes); } @@ -89,7 +89,7 @@ wycheproof.BigInteger.prototype.toBase64Url = function(optValue) { */ wycheproof.BigInteger.prototype.toArrayBuffer = function(optValue) { var bytes = this.toByteArray(); - if (goog.isDef(optValue) && optValue > bytes.length) { + if (optValue !== undefined && optValue > bytes.length) { var addingZeros = new Array(optValue-bytes.length).fill(0); bytes = addingZeros.concat(bytes); }