title: How to use node Buffer module in a client side browser - detailed explanation required please
body: <p>First things first. I know that there are other questions that are similar to this e.g. <a href="https://stackoverflow.com/questions/25847799/use-nodejs-buffer-class-from-client-side">use NodeJs Buffer class from client side</a> or
  <a href="https://stackoverflow.com/questions/56237161/how-can-i-use-node-js-buffer-library-in-client-side-javascript">How can I use node.js buffer library in client side javascript</a></p>
  <p>However, I don't understand how to make use of the reference to use browserify though it is given approval.</p>
  <p>Here is my Node code:</p>
  <pre><code>import { Buffer } from 'buffer/';
  </code></pre>
  <p>I know this is the ES6 equivalent of require.</p>
  <p>I would like a javaScript file implementation of this module so that I can simply use the standard html file reference:</p>
  <pre><code>&lt;script src=./js/buffer.js&gt;&lt;/script&gt;
  </code></pre>
  <p>And then use it as in for example</p>
  <pre><code>return new Buffer(temp).toString('utf-8');
  </code></pre>
  <p>This simply falls over with the</p>
  <pre><code>Uncaught ReferenceError: Buffer is not defined 
  </code></pre>
  <p>no matter how I create the buffer.js file.</p>
  <p>So using the browserify idea I've tried using the standalone script (from the <a href="https://www.npmjs.com/package/buffer" rel="nofollow noreferrer">https://www.npmjs.com/package/buffer</a> as <a href="https://bundle.run/buffer@6.0.3" rel="nofollow noreferrer">https://bundle.run/buffer@6.0.3</a> )</p>
  <p>I've created a test.js file and put</p>
  <pre><code>var Buffer = require('buffer/').Buffer 
  </code></pre>
  <p>in it and then run browserify on it as</p>
  <pre><code>browserify test.js -o buffer.js
  </code></pre>
  <p>and many other variations.
  I'm not getting anywhere. I know I must be doing something silly that reflects my ignorance. Maybe you can help educate me please.</p>