mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
require() loads js in strict mode
Main advantage: variables won't accidentally leak into the global scope. $ cat gg.js bad = true https://img.skitch.com/20110909-kry3pm4ask5qhj5rg43yb37tci.png
This commit is contained in:
@@ -45,6 +45,7 @@ exts =
|
||||
if not /define\(/.test code
|
||||
code = """
|
||||
define(function(require, exports, module) {
|
||||
'use strict';
|
||||
#{code};
|
||||
});
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user