title: browserify bs58 library after npm install
body: <p>I'm attempting to browserify the <code>bs58</code> module following <a href="http://cryptocoinjs.com/modules/misc/bs58/" rel="nofollow noreferrer">these instructions</a>:</p>
  
  <pre><code>npm install --save bs58
  
  npm install -g browserify
  
  browserify &lt; /mypath/lib/bs58.js &gt; /mypath/lib/bs85.bundle.js
  </code></pre>
  
  <p>Then in my html + js file I use:</p>
  
  
  
  <p>As I understand it this should give me a bs58 object to access the <code>encode</code> and <code>decode</code> functions. However, I get <code>ReferenceError: bs58 is not defined</code> on attempting usage.</p>
  
  <p>Looking at the browserified code looks like:</p>
  
  <pre><code>(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&amp;&amp;require;if(!u&amp;&amp;a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&amp;&amp;require;for(var o=0;o&lt;r.length;o++)s(r[o]);return s}return e})()({},{},[]);
  </code></pre>
  
  <p>This doesn't contain the word <code>encode</code> as I might expect.</p>
  
  <p>I'm not 100% certain the module installed correctly, but the <a href="http://cryptocoinjs.com/modules/misc/bs58/" rel="nofollow noreferrer">demo examples</a> seem to run ok in node (after <code>require bs58</code>).</p>
  
  <p>A few questions have come up whilst attempting to debug this:</p>
  
  <p><strong>1. How do I check whether the bs58 module has been correctly browserified?</strong></p>
  
  <p><strong>2. Where should the <code>lib/bs58.js</code> be located by default?</strong></p>
  
  <p><strong>3. How should I access the <code>encode</code> and <code>decode</code> bs58 functions in the browser?</strong></p>
  
  <p><strong>4. Are there any alternatives for base58 encoding/decoding in the browser?</strong></p>