Complete Code: Fiddle
I'm trying to learn UMD, I took a day trying to run this Ramjet JS. I don't understand this error that occurs here:
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.ramjet = factory());
}(this, function () { 'use strict';
...
It's just at the beginning, it must be a very foolish mistake.
Specifically in the line:
- (global.ramjet = factory());
Google chrome console says:
Uncaught TypeError: Cannot set property 'ramjet' of undefined
(anonymous function) @ ramjet.umd.js:4
(anonymous function) @ ramjet.umd.js:1
Thank you very much