sjkaliski/numeric.ly — pull request #5 by ethanresnick (2012-09-13 04:45:12+00:00)
Title: More robust, but still backwards-compatible, evaluate()

Using Math and string function names in evaluate() will prove limiting, imo, mainly because it means custom functions (not part of Math) can't be evaluated, which is a big loss. For instance, it means there's no way for me to pass in my own function and find its limit. Also eval() is slow and with isn't allowed in ES5 strict.

This version allows (really prefers) any function to be passed in as a function object, but uses a type check to support the earlier API.

If possible though, I'd probably drop that API all together.