kenperlin / chalktalk

MIT License
2.12k stars 137 forks source link

Cleanup and strict #12

Closed Kronopath closed 7 years ago

Kronopath commented 7 years ago

This adds "use strict" to (nearly) every file included in index.html, and to every sketch's init function (via the eval they're created from). This sets the JS into strict mode, meaning you can't implicitly declare global variables, "this" doesn't become "window" in top-level functions, and attempting to overwrite immutable properties will generate an error instead of failing silently. For more info, see here.

This also removes a couple of files that didn't seem to be used anywhere else in the project.