title: Building my JS library, a couple questions
body: <p>I'm building a library (https://github.com/OscarGodson/storageLocker), a localStorage wrapper to be more exact, but because this is my first try at OO JavaScript I'm still learning and I have a couple questions.</p>
  
  <ol>
  <li><p>I've seen in other libraries that sometimes they wrap them in a anonymous function. Do I, or should I, do that with this? And if so, how without breaking anything?</p></li>
  <li><p>For the internal API (basically, the internal functions) how should I write them? Should add them to the main object e.g. <code>storageLocker.prototype.myInternalFunction()</code> or just <code>myInternalFunction()</code> randomly in my script? I didn't want the functions to be global though... One of the functions for example just checks a bunch of items in the JSON, sees if their objects, and then checks what the object type is (like <code>Date()</code>) and then converts it.</p></li>
  <li><p>How/where should I add global, to my script, vars? e.g. i have a var called <code>patterns</code> that is something like <code>var patterns = {"date":/\/Date\(([0-9]+)\)\//}</code> how should I add that into my script?</p></li>
  </ol>
  
  <p>Thanks a lot. I want to write my script the <em>right way</em> so im asking you guys. I don't know of any JS guys locally that do any OO JS, they're all old school types...</p>