lib/utils.js
function bufferFrom(data, enc) {
  if (typeof Buffer.from == 'function') {
    return Buffer.from(data, enc);
  } else {
    return new Buffer(data, enc);
  }
}
function bufferFrom(data, enc) {
  if (typeof Buffer.from == 'function') {
    return Buffer.from(data, enc);
  } else {
    return new Buffer(data, enc);
  }
}
function bufferFrom ( data , enc ) { if ( typeof Buffer . from == 'function' ) { return Buffer . from ( data , enc ) ; } else { return new Buffer ( data , enc ) ; } }
Create a new buffer with the input contents.

@param data {Array|String} The buffer's data.
@param enc {String} Encoding, used if data is a string.
Create a new buffer with the input contents .