From d542b761d0971e06ca2331255ce38f856b6a6131 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Thu, 29 Jul 2021 23:53:07 +0300 Subject: [PATCH] simplify IIFE - expose to window --- modules/heightmap-generator.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/heightmap-generator.js b/modules/heightmap-generator.js index b3e1e684..7fc70a6c 100644 --- a/modules/heightmap-generator.js +++ b/modules/heightmap-generator.js @@ -1,8 +1,6 @@ "use strict"; -(function (global, factory) { - typeof exports === "object" && typeof module !== "undefined" ? (module.exports = factory()) : typeof define === "function" && define.amd ? define(factory) : (global.HeightmapGenerator = factory()); -})(this, function () { +window.HeightmapGenerator = (function () { let cells, p; const generate = function () { @@ -411,4 +409,4 @@ } return {generate, addHill, addRange, addTrough, addStrait, addPit, smooth, modify}; -}); +})();