module.exports=toBuffer;var makeBuffer=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from:bufferFrom;function bufferFrom(r,f){return new Buffer(r,f)}function toBuffer(r,f){if(Buffer.isBuffer(r))return r;if("string"==typeof r)return makeBuffer(r,f);if(Array.isArray(r))return makeBuffer(r);throw new Error("Input should be a buffer or a string")}