Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed issue with old uglify-js version

  • Loading branch information...
commit 18134a8e54fd9638f86d5e6ecf90493e9b3e5747 1 parent e99e632
@constantology authored
Showing with 8 additions and 7 deletions.
  1. +2 −1  .catn8
  2. +5 −5 m8.js
  3. +1 −1  m8.min.js
View
3  .catn8
@@ -4,7 +4,8 @@
"files" : ["vars", "lib", "lib.x", "nativex", "expose"]
},
"target" : {
- "dir" : "{pwd}"
+ "dir" : "{pwd}",
+ "min" : true
},
"type" : "application/javascript"
}
View
10 m8.js
@@ -1,7 +1,7 @@
;!function( root, Name, PACKAGE ) {
"use strict";
-/*~ src/vars.js ~*/
+/*~ m8/src/vars.js ~*/
// if ENV === commonjs we want root to be global
typeof global == 'undefined' ? root : ( root = global );
@@ -58,7 +58,7 @@
'Number' : [], 'Object' : [], 'RegExp' : [], 'String' : []
};
-/*~ src/lib.js ~*/
+/*~ m8/src/lib.js ~*/
function __lib__( val ) { return val; }
function bless( ns, ctx ) {
@@ -360,7 +360,7 @@
return o;
}
-/*~ src/lib.x.js ~*/
+/*~ m8/src/lib.x.js ~*/
// Commonjs Modules 1.1.1: http://wiki.commonjs.org/wiki/Modules/1.1.1
// notes section: http://wiki.commonjs.org/wiki/Modules/ProposalForNativeExtension
// specifies the possibility of sandboxing JavaScript Natives in Modules in future versions
@@ -387,7 +387,7 @@
Type[__xid__] = extenders.length; // assigned every time __lib__.x() is called, and
} // potentilly throwing overwrite errors.
-/*~ src/nativex.js ~*/
+/*~ m8/src/nativex.js ~*/
x.cache( 'Array', function( Type ) {
var PROTO = Type.prototype;
@@ -522,7 +522,7 @@
}, 'w' );
} );
-/*~ src/expose.js ~*/
+/*~ m8/src/expose.js ~*/
iter( PACKAGE ) || ( PACKAGE = ENV == 'commonjs' ? module : root );
defs( ( __lib__ = expose( __lib__, Name, PACKAGE ) ), {
View
2  m8.min.js
@@ -1 +1 @@
-!function(e,t,n){"use strict";function C(e){return e}function k(e,t){switch(lt(e)){case"array":break;case"string":e=e.split(".");break;default:return L(t)}w.test(e[0])&&(t=C,e.shift());if(!e.length)return L(t);e[0].indexOf("^")||(t||e[0]=="^"?e.shift():e[0]=e[0].substring(1)),t=L(t);var n;while(n=e.shift())t=t[n]||(t[n]=tt());return t}function L(t){return s=="commonjs"?t?J(t)?t.exports:t:module.exports:t||e}function A(e){var t=Number(e),n;return isNaN(t)?(n=String(e))in f?f[n]:e:t}function O(e,t,n){n=n===!0,t||(t=e,e=tt());for(var r in t)!X(t,r)||n&&X(e,r)||(e[r]=t[r]);return e}function M(e,t,n){return n=n===!0,t||(t=e,e=tt()),Object.getOwnPropertyNames(t).reduce(function(e,r){return n&&X(e,r)||_(e,r,H(t,r)),e},e)}function _(e,n,r){var i=x.call(arguments,3),s=R(e,n),o,u,a,f;switch(lt(i[0])){case"string":u=d[i.shift()];break;case"object":u=i.shift();break;default:a=lt(r),u=a!="object"&&s?H(e,n):null,!u||(u=a=="function"?d.cw:d.cew)}return f=i.shift()===!0,o=i.shift()===!0,s&&!f?o&&new Error(t+".def cannot overwrite existing property: "+n+", in item type: "+ct(e)+"."):(a!="object"&&u&&(r=P(r,u)),(r.get||r.set)&&delete r.writable,Object.defineProperty(e,n,r)),C}function D(e,t,n,r,i){n||(n="cw");for(var s in t)!X(t,s)||_(e,s,t[s],n,r,i);return C}function P(e,t){return O(lt(e)=="object"?e:{value:e},lt(t)=="object"?t:d[String(t).toLowerCase()]||d.cew,!0)}function H(e,t){return Object.getOwnPropertyDescriptor(e,t)}function B(e){return!j(e)||!Q(e)&&K(e)||!1}function j(e){return!(e===null||e===u||typeof e=="number"&&isNaN(e))}function F(t,n,i){typeof n!="string"&&t[r]&&(i=n,n=t[r]);var o,u=tt();return u[r]=n,u[__type__]="library",s=="commonjs"&&J(i)?i.exports=t:(i||(i=e),(o=i[n])&&K(o)?(o[n]=t,t=M(o,t)):_(i,n,P({value:t},"ew")),s=="browser"&&(typeof define!="function"||!define.amd||define(n,[],function(){return t}))),D(t,u,"w",!0),t}function I(e){return e.name||e.displayName||(String(e).match(E)||["",""])[1].trim()}function q(e){return U(e,Array.coerce(arguments,1))}function R(e,t){return String(t)in Object(e)}function U(e,t,n){return String(e).replace(n||y,function(e,n){return t[n]||""})}function z(){return T.replace(b,W)}function W(e){var t=m()*16|0;return(e=="x"?t:t&3|8).toString(16)}function X(e,t){return o.hasOwnProperty.call(Object(e),String(t))}function V(e,t){return e?R(e,"id")&&!B(e.id)?e.id:e.id=$(t):$(t)}function $(e){return(e||p)+"-"+ ++h}function J(e){if(a===null)return!1;try{return e instanceof a}catch(t){return!1}}function K(e){return R(e,"length")||lt(e)=="object"}function Q(e){return("length"in(e=Object(e))?e:Object.keys(e)).length}function G(e,t){var n;if(!t)switch(n=lt(e)){case"array":case"object":t=e,e=new(t.constructor||Object);break;default:return e}else n=lt(t);switch(n){case"object":return Object.keys(t).reduce(Z,{source:t,target:e}).target;case"array":return e.length=t.length,t.reduce(Y,e);default:return t}}function Y(e,t,n){return e[n]=lt(e[n])===lt(t)?G(e[n],t):G(t),e}function Z(e,t){return e.target[t]=lt(e.target[t])===lt(e.source[t])?G(e.target[t],e.source[t]):G(e.source[t]),e}function et(){}function tt(e){var t=Object.create(null);return typeof e=="object"?O(t,e):t}function nt(e,t,n){var r;n=String(n);if(arguments.length>3){n=x.call(arguments,2);while(r=n.shift())if(nt(e,t,r))return!0;return!1}if(e(t,n))return!0;if(typeof t=="string"||!~n.indexOf("."))return!1;n=n.split(".");while(r=n.shift()){if(!nt(e,t,r))return!1;t=t[r]}return!0}function rt(e,t){var n=[e];while(++e<=t)n.push(e);return n}function it(e,t){t=Array.isArray(t)?t:x.call(arguments,1);var n=Array.isArray(e)?st:ot;return t.forEach(n,e),e}function st(e){var t=this.indexOf(e);t=~t?t:!isNaN(e)&&e in this?e:t,t<0||this.splice(t,1)}function ot(e){delete this[e]}function ut(e){return o.toString.call(e)}function at(e){return o.valueOf.call(e)}function ft(e){return e==c?c:e==l||e=="nodelist"?l:!e.indexOf("htm")&&e.lastIndexOf("element")+7===e.length?"htmlelement":!1}function lt(e){var t=ut(e);return t in v?v[t]:v[t]=t.split(" ")[1].split("]")[0].replace(S,"$1").toLowerCase()}function ct(e){if(e===null||e===u)return!1;var t=R(e,__type__)?e[__type__]:Object.getPrototypeOf(e)===null?"nullobject":u;return t!=="object"?t:nt(X,e,"configurable","enumerable","writable")&&X(e,"value")||nt(X,e,"get","set")?"descriptor":t}function ht(e,t){if(!t)return G(e);switch(lt(t)){case"object":return Object.keys(t).reduce(dt,{source:t,target:e}).target;case"array":return t.reduce(pt,e);default:return e}}function pt(e,t,n){return e[n]=R(e,n)?lt(e[n])==lt(t)?ht(e[n],t):e[n]:G(t),e}function dt(e,t){return e.target[t]=R(e.target,t)?lt(e.target[t])==lt(e.source[t])?ht(e.target[t],e.source[t]):e.target[t]:G(e.source[t]),e}function vt(){return x.call(arguments).forEach(gt),C}function mt(e){e(this,C)}function gt(e){R(e,i)||_(e,i,0,"w");var t=N[e[r]||I(e)];if(!t)return;t.slice(e[i]).forEach(mt,e),e[i]=t.length}typeof global=="undefined"?e:e=global;var r="__name__",__type__="__type__",i="__xid__",s=typeof module!="undefined"&&"exports"in module&&typeof require=="function"?"commonjs":typeof navigator!="undefined"?"browser":"other",o=Object.prototype,u,a=s!="commonjs"?null:require("module"),f=[!1,NaN,null,!0,u].reduce(function(e,t){return e[String(t)]=t,e},tt()),l="htmlcollection",c="htmldocument",h=999,p="anon",d=function(){var e={ce:"ec",cw:"wc",ew:"we",cew:"cwe ecw ewc wce wec".split(" ")},t="configurable enumerable writable".split(" "),n={c:[!0,!1,!1],ce:[!0,!0,!1],cew:[!0,!0,!0],cw:[!0,!1,!0],e:[!1,!0,!1],ew:[!1,!0,!0],r:[!1,!1,!1],w:[!1,!1,!0]},r=Object.keys(n).reduce(function(r,i){function s(e){r[e]=r[i]}var o=e[i];return r[i]=t.reduce(function(e,t,r){return e[t]=n[i][r],e},tt()),!o||(Array.isArray(o)?o.forEach(s):s(o)),r},tt());return delete r[u],r}(),v="Array Boolean Date Function Null Number Object RegExp String Undefined".split(" ").reduce(function(e,t){return e["[object "+t+"]"]=t.toLowerCase(),e},tt()),m=Math.random,g=/global|window/i,y=/\$?\{([^\}]+)\}/g,b=/[xy]/g,w=new RegExp("^\\u005E?"+t),E=/[\s\(]*function([^\(]+).*/,S=/^[Ww]ebkit|[Mm]oz|O|[Mm]s|[Kk]html(.*)$/,x=Array.prototype.slice,T="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",N={Array:[],Boolean:[],Date:[],Function:[],Number:[],Object:[],RegExp:[],String:[]};_(vt,"cache",function(e,t){return typeof e=="string"||(e=e[r]||I(e)),N[e]||(N[e]=[]),N[e].push(t),C},"w"),vt.cache("Array",function(e){_(e,"coerce",function(e,t,n){return R(e,"length")?(t=ct(t)=="number"?t>0?t:0:0,n=ct(n)=="number"?n>t?n:n<=0?e.length+n:t+n:e.length,x.call(e,t,n)):[e]},"w"),_(e.prototype,"find",function(e,t){var n=-1,r=this.length>>>0;t||(t=this);while(++n<r)if(!!e.call(t,this[n],n,this))return this[n];return null},"w")}),vt.cache("Boolean",function(e){_(e,"coerce",function(e){switch(ct(e)){case"boolean":return e;case"nan":case!1:return!1;case"number":case"string":return e in f?!!f[e]:Number(e)!==0}return!0},"w")}),vt.cache("Function",function(e){function t(e){return!e||e in o}function n(){return this.toString()}function i(){return this}var s="__xname__",o={Anonymous:!0,anonymous:!0},u={mimic:function(e,t){var r=e.valueOf();return D(this,{displayName:t||I(r),toString:n.bind(r),valueOf:i.bind(r)},"c",!0),this}};u[r]={get:function(){if(!this[s]){var e=this.valueOf(),n=e!==this?t(e[r])?null:e[r]:null,i=n||I(this);!t(i)||t(this.displayName)||(i=this.displayName),_(this,s,i||"anonymous","w")}return this[s]}},D(e.prototype,u,"w"),_(e,"anon_list",{value:o},"w")}),vt.cache("Object",function(e){_(e.prototype,__type__,O({get:function(){var e,t=this,n=t.constructor,i=lt(t),s=ft(i)||(g.test(i)?"global":!1);return s?s:i=="number"?isNaN(t)?"nan":"number":i=="object"&&typeof n=="function"&&n[__type__]!="function"?(e=String(n[r]).toLowerCase(),!e||e=="anonymous"?n[__type__]||i:e):i}},d.r)),D(e,{key:function(t,n){return e.keys(e(t)).find(function(e){return t[e]===n})},reduce:function(t,n,r){return e.keys(e(t)).reduce(function(e,r,i){return e=n.call(t,e,t[r],r,t,i),e},r)},value:function(t,n){if(isNaN(n)){if(R(t,n))return t[n];if(!!~n.indexOf(".")){var r;n=n.split(".");while(r=n.shift())if((t=e.value(t,r))===u)break;return t}}return B(t)?u:j(t[n])?t[n]:typeof t.get=="function"?t.get(n):typeof t.getAttribute=="function"?t.getAttribute(n):u},values:function(t){return e.keys(Object(t)).map(function(e){return t[e]})}},"w")}),K(n)||(n=s=="commonjs"?module:e),D(C=F(C,t,n),{ENV:s,global:{value:e},modes:{value:d},bless:k,coerce:A,copy:O,cpdef:M,def:_,defs:D,describe:P,description:H,empty:B,exists:j,expose:F,format:q,got:nt.bind(null,R),gsub:U,guid:z,has:nt.bind(null,X),id:V,iter:K,len:Q,merge:G,nativeType:lt,noop:et,ntype:lt,obj:tt,range:rt,remove:it,tostr:ut,type:ct,update:ht,valof:at,x:vt},"w"),vt(Object,Array,Boolean,Function)}(this,"m8")
+[object Object]
Please sign in to comment.
Something went wrong with that request. Please try again.