title: Trying to make an NPM package
body: <p>Basically, im trying to make a package that would look like this in my main project file</p>
  <pre class="lang-js prettyprint-override"><code>const package = require(&quot;package&quot;);
  const newPackage = new package({
    param: 'value',
    otherParam: 'otherValue'
  });
  
  </code></pre>
  <p>and then in every other project file I could use</p>
  <pre class="lang-js prettyprint-override"><code>const { someFunction } = require('package')
  
  someFunction()
  </code></pre>
  <p>and then the <code>SomeFunction()</code> function should return <code>value</code> and <code>otherValue</code>
  without needing to do</p>
  <pre class="lang-js prettyprint-override"><code>const package = require(&quot;package&quot;);
  const newPackage = new package({
    param: 'value',
    otherParam: 'otherValue'
  });
  
  newPackage.someFunction()
  </code></pre>
  <p>in every project file.</p>
  <p>Im not sure how to do this or if this is even possible, but would love something that would work like (or similar to) this.</p>