code: function validateEncoding(encoding) {
  		if (encoding === null || encoding === 'buffer' || Buffer.isEncoding(encoding)) {
  			return true;
  		}
  		throw new TypeError('Unknown encoding: ' + encoding);
  	}
docs: validateEncoding(encoding) -------------------------------------------------- Returns `true` if `encoding` is a known encoding or `null`. Otherwise throws a TypeError, like when the Buffer class sees an unknown encoding.