lib/store.js
function createBuffer(str, encoding) {
  if (BUFFER_FROM) {
    return Buffer.from(str, encoding || ENCODING);
  }
  return new Buffer(str, encoding || ENCODING);
}
function createBuffer(str, encoding) {
  if (BUFFER_FROM) {
    return Buffer.from(str, encoding || ENCODING);
  }
  return new Buffer(str, encoding || ENCODING);
}
function createBuffer ( str , encoding ) { if ( BUFFER_FROM ) { return Buffer . from ( str , encoding || ENCODING ) ; } return new Buffer ( str , encoding || ENCODING ) ; }
Create a buffer from a string

@param   {String}    str         String value
@param   {String}    [encoding]  Optional string encoding
@returns {Buffer}    string as buffer
Create a buffer from a string