sequelize/sequelize — pull request #1796 by mbroadst (2014-05-22 02:20:02+00:00)
Title: use strict mode for all library scripts

This includes a few important fixes to the code itself:

- removal of the "const" keyword (this is illegal in strict mode)
- lib/dialects/postgres/hstore.js
- lib/migrator.js

- removal of the defineProperty for sequelize in lib/model.js (in the ctor we are trying to set that value, but it only has a getter defined)

- changed arguments.callee in lib/utils.js to just call the function itself. arguments.callee is illegal in strict mode [more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode#Making_eval_and_arguments_simpler)

- removal of the (seemingly) unused "dialect" variable in lib/sequelize.js, this wasn't even properly defined as a variable, and so caused strict mode to throw an exception. After inspection, it looks like it wasn't used anywhere anyway

- finally, a change in ntest/dao-factory.test.js. This took me a little bit to figure out, but strict mode changes the rules a little bit w.r.t. "this" in variable scope. When you shorthand the function for the QueryGenerator, the escape method no longer had any idea what "this" was because it was used outside of the findAll method. Please take great care in reviewing this change, because I'm not even 100% sure myself exactly why this was the case :)