title: Browserify - How to call function bundled in a file generated through browserify in browser
body: <p>I am new to nodejs and browserify. I started with this <a href="http://browserify.org/" rel="noreferrer">link</a> .</p>
  
  <p>I have file main.js which contains this code</p>
  
  <pre><code>var unique = require('uniq');
  
  var data = [1, 2, 2, 3, 4, 5, 5, 5, 6];
  
  this.LogData =function(){
  console.log(unique(data));
  };
  </code></pre>
  
  <p>Now I Install the uniq module with npm:</p>
  
  <pre><code> npm install uniq
  </code></pre>
  
  <p>Then I bundle up all the required modules starting at main.js into a single file called bundle.js with the browserify command: </p>
  
  <pre><code>browserify main.js -o bundle.js
  </code></pre>
  
  <p>The generated file looks like this:</p>
  
  <pre><code>(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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})({1:[function(require,module,exports){
  var unique = require('uniq');
  
  var data = [1, 2, 2, 3, 4, 5, 5, 5, 6];
  
  this.LogData =function(){
  console.log(unique(data));
  };
  
  },{"uniq":2}],2:[function(require,module,exports){
  "use strict"
  
  function unique_pred(list, compare) {
    var ptr = 1
      , len = list.length
      , a=list[0], b=list[0]
    for(var i=1; i&lt;len; ++i) {
      b = a
      a = list[i]
      if(compare(a, b)) {
        if(i === ptr) {
          ptr++
          continue
        }
        list[ptr++] = a
      }
    }
    list.length = ptr
    return list
  }
  
  function unique_eq(list) {
    var ptr = 1
      , len = list.length
      , a=list[0], b = list[0]
    for(var i=1; i&lt;len; ++i, b=a) {
      b = a
      a = list[i]
      if(a !== b) {
        if(i === ptr) {
          ptr++
          continue
        }
        list[ptr++] = a
      }
    }
    list.length = ptr
    return list
  }
  
  function unique(list, compare, sorted) {
    if(list.length === 0) {
      return []
    }
    if(compare) {
      if(!sorted) {
        list.sort(compare)
      }
      return unique_pred(list, compare)
    }
    if(!sorted) {
      list.sort()
    }
    return unique_eq(list)
  }
  
  module.exports = unique
  },{}]},{},[1])
  </code></pre>
  
  <p><strong>After including bundle.js file into my index.htm page, how do I call logData function ??</strong></p>