(function (plugin) { if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { // NodeJS module.exports = plugin; } else { if (typeof define === "function" && define.amd) { // AMD define(function () { return plugin; }); } else { // Other environment (usually