title: MEAN Stack: Storing functions in Database to achieve Excel-like behaviour
body: <p>I want to code Excel-like behaviour in my MEAN Application. What I mean with <strong>excel-like</strong> behaviour that is having cells and columns and rows (I have that in Angular already) and now I want to enable users to select e.g. 2 columns and let a self-defined calculation run over it.</p>
  <p>Now storing User-defined Functions in MongoDB sounds like a very bad idea, since a user could drop the database.</p>
  <h3>The Stack</h3>
  <pre><code>[User Input]
  [Calculations/Functions]
  [Controller] 
  [Middleware]
  [API+Server]
  [DB]
  </code></pre>
  <p>I discussed how to achieve this with MEAN here: <a href="https://stackoverflow.com/questions/26784927/convert-json-string-to-objects/26786340#26786340">Convert JSON String to Objects</a> however I highly doubt this will be secure. Any idea how to achieve this in a solid fashion?</p>