This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function BaseClass(name, methods, statics){ | |
var $$$ = 'function $$$(args) {'+ | |
'args = arguments;'+ | |
'if(!(this instanceof $$$)){ return new $$$($$$, arguments) }'+ | |
'if(args[0] === $$$){ args = args[1] }'+ | |
'if(this.init){ return this.init.apply(this, args) }'+ | |
'}'; | |
var _Class = ConstructorWithName(name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var defined = function (setup) { | |
'use strict'; | |
setup.symble = setup.symble || 'define'; | |
/////////////healpers////////////// | |
[].indexOf||(Array.prototype.indexOf=function(a,b,c){for(c=this.length,b=(c+~~b)%c;b<c&&(!(b in this)||this[b]!==a);b++);return b^c?b:-1;}); | |
[].filter ||(Array.prototype.filter = function(fn, thisp) { if (this === null) throw new TypeError; if (typeof fn !== "function") throw new TypeError; var result = []; for (var i = 0; i < this.length; i++){if (i in this) {var val = this[i]; if (fn.call(thisp, val, i, this)){result.push(val);}}} return result;}); | |
[].map||(Array.prototype.map=function(a){for(var b=this,c=b.length,d=[],e=0,f;e<b;)d[e]=e in b?a.call(arguments[1],b[e],e++,b):f;return d}); | |
var xmlHTTPObject = (function getXMLHTTPObject(){var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=!1;for(va |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = [].map; | |
var styles = map.call(document.styleSheets,function(sheet){ | |
return map.call(sheet.cssRules,function(rule){ | |
return rule.cssText; | |
}); | |
}); | |
styles = map.call(styles,function(s){ | |
return s.join('\n'); | |
}).join('\n\n'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jsl() | |
( 'sum', 1, 2) | |
( Jsl.get, function(val){ this.firstSum = val; } ) | |
( Jsl.sum, 1, 2, 3, 4, 5 ) | |
( Jsl.mul, 1, 2, 3, 4, 5 ) | |
( Jsl.getAll, function(val1, val2) { | |
Jsl(this) | |
( Jsl.set, {secondSum : val1, thirdSum: val2} ) | |
(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Element.prototype.__appendChild = Element.prototype.appendChild; | |
//Element.prototype.appendChild = function(){Element.prototype.__appendChild.apply(this, arguments); this.classList.contains('view') && console.log.apply(console, arguments)}; | |
var BObject = function BObject() {}; | |
BObject.$super = function (fn, args, name, parent) { | |
parent = parent || this.parent(); | |
debugger; | |
if (parent) { | |
if (parent.name === name && parent.prototype[fn]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;var Fs = (function () { | |
'use strict'; | |
function extend(obj) { | |
Array.prototype.slice.call(arguments, 1).forEach(function (source) { | |
var prop; | |
for (prop in source) { | |
if (source[prop] !== void 0) { | |
obj[prop] = source[prop]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Elm(node) { | |
if (typeof node === 'string') { | |
node = document.querySelector(node); | |
} | |
this.node = node; //|| document.createElement('div'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toCode(o, name) { | |
name = name || 'code'; | |
var cache = [o]; | |
var toCode = function (o, name) { | |
if (typeof o === 'string') { | |
return "'" + o + "'"; | |
} | |
if (o instanceof Array) { | |
return toCode.arrayToCode(o, name); | |
} |