-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWM-src.min.js
1 lines (1 loc) · 1.16 KB
/
WM-src.min.js
1
(function(window,document,undefined){var oldWM=window.WM,WM={};WM.version="0.1";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=WM}else if(typeof define==="function"&&define.amd){define(WM)}WM.noConflict=function(){window.WM=oldWM;return this};window.WM=WM;WM.Util={extend:function(dest){var sources=Array.prototype.slice.call(arguments,1),i,j,len,src;for(j=0,len=sources.length;j<len;j++){src=sources[j]||{};for(i in src){if(src.hasOwnProperty(i)){dest[i]=src[i]}}}return dest},bind:function(fn,obj){var args=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return fn.apply(obj,args||arguments)}},trim:function(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")},formatNum:function(num,digits){var pow=Math.pow(10,digits||5);return Math.round(num*pow)/pow},splitWords:function(str){return WM.Util.trim(str).split(/\s+/)},setOptions:function(obj,options){obj.options=WM.extend({},obj.options,options);return obj.options},isArray:Array.isArray||function(obj){return Object.prototype.toString.call(obj)==="[object Array]"},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}})(window,document);