Skip to content

Commit

Permalink
feat: resolve global with CSP safe method
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Jul 10, 2017
1 parent 6954315 commit d386449
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions global.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";
/* eslint strict: "off" */

// eslint-disable-next-line no-new-func
module.exports = new Function("return this")();
module.exports = (function () {
return this;
}());
1 change: 1 addition & 0 deletions test/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

module.exports = function (t, a) {
a.ok(t && typeof t === "object");
a(typeof t.Array, "function");
};

0 comments on commit d386449

Please sign in to comment.