From 799f55d157c84faeb9f12816a316d4bd9b58f155 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Tue, 22 Apr 2014 09:40:57 -0700 Subject: [PATCH] Simplify UMD wrapper --- mustache.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mustache.js b/mustache.js index f1bafa0..700f536 100644 --- a/mustache.js +++ b/mustache.js @@ -5,19 +5,13 @@ /*global define: false*/ -(function (root, factory) { +(function (global, factory) { if (typeof exports === "object" && exports) { factory(exports); // CommonJS + } else if (typeof define === "function" && define.amd) { + define(factory({})); // AMD } else { - var mustache = {}; - - factory(mustache); - - if (typeof define === "function" && define.amd) { - define(mustache); // AMD - } else { - root.Mustache = mustache; //