Code Duplication    Length = 1-1 lines in 2 locations

node_modules/mocha/mocha.js 1 location

@@ 11953-11953 (lines=1) @@
11950
  }
11951
};
11952
11953
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
11954
  // node::ParseEncoding() requires lower case.
11955
  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
11956
  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);

node_modules/readable-stream/lib/_stream_writable.js 1 location

@@ 356-356 (lines=1) @@
353
  }
354
};
355
356
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
357
  // node::ParseEncoding() requires lower case.
358
  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
359
  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);