Code Duplication    Length = 16-16 lines in 2 locations

formio/node_modules/bson/browser_build/bson.js 1 location

@@ 13209-13224 (lines=16) @@
13206
	  return false;
13207
	};
13208
13209
	var longtoHex = function (value) {
13210
	  var buffer = new Buffer(8);
13211
	  var index = 0;
13212
	  // Encode the low 64 bits of the decimal
13213
	  // Encode low bits
13214
	  buffer[index++] = value.low_ & 0xff;
13215
	  buffer[index++] = value.low_ >> 8 & 0xff;
13216
	  buffer[index++] = value.low_ >> 16 & 0xff;
13217
	  buffer[index++] = value.low_ >> 24 & 0xff;
13218
	  // Encode high bits
13219
	  buffer[index++] = value.high_ & 0xff;
13220
	  buffer[index++] = value.high_ >> 8 & 0xff;
13221
	  buffer[index++] = value.high_ >> 16 & 0xff;
13222
	  buffer[index++] = value.high_ >> 24 & 0xff;
13223
	  return buffer.reverse().toString('hex');
13224
	};
13225
13226
	var int32toHex = function (value) {
13227
	  var buffer = new Buffer(4);

formio/node_modules/bson/lib/bson/decimal128.js 1 location

@@ 96-111 (lines=16) @@
93
  return false;
94
}
95
96
var longtoHex = function(value) {
97
  var buffer = new Buffer(8);
98
  var index = 0;
99
  // Encode the low 64 bits of the decimal
100
  // Encode low bits
101
  buffer[index++] = value.low_ & 0xff;
102
  buffer[index++] = (value.low_ >> 8) & 0xff;
103
  buffer[index++] = (value.low_ >> 16) & 0xff;
104
  buffer[index++] = (value.low_ >> 24) & 0xff;
105
  // Encode high bits
106
  buffer[index++] = value.high_ & 0xff;
107
  buffer[index++] = (value.high_ >> 8) & 0xff;
108
  buffer[index++] = (value.high_ >> 16) & 0xff;
109
  buffer[index++] = (value.high_ >> 24) & 0xff;
110
  return buffer.reverse().toString('hex');
111
}
112
113
var int32toHex = function(value) {
114
  var buffer = new Buffer(4);