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 stringDebug(sender, method, object) { | |
| var tostring =Object.prototype.toString; | |
| Object.prototype.toString = function(padding) { | |
| padding = padding || 3; | |
| var res = Array(padding-2).join(" ")+"{"; | |
| var _self = this; | |
| for(var attr in _self) { | |
| res += '\n' + Array(padding).join(" ") + attr + " : " + ((this[attr] && (padding +2) < 12) ? this[attr].toString(padding +2) : "null"); | |
| } | |
| return res+"\n"+Array(padding-2).join(" ")+"}"; |
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 fn = require('to-function'); | |
| function toObject(keys,values) { | |
| var rv = {}; | |
| for (var i = 0; i < keys.length; ++i) | |
| if (keys[i] !== undefined) rv[keys[i]] = values[i]; | |
| return rv; | |
| } | |
| function h(f) { | |
| var args = f.split("=>")[0].split(","); | |
| var func = f.split("=>")[1].split('-').map(function(fs){ |
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 addScript(src) { | |
| var script = document.createElement("script"); | |
| script.src = src; | |
| document.body.appendChild(script); | |
| return addScript; | |
| } | |
| addScript('//rawgithub.com/kriskowal/q/master/q.min.js'); | |
| /** | |
| * A Object wrapper with some iteration helpers. | |
| * @constructor |
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
| /** | |
| Creates a new Objserver. | |
| @class Observes an object and updates its value on changes that are applied. | |
| @param [value] - Optional init value; - | |
| */ | |
| function Objserver(value) { | |
| this.$value = value; | |
| this.$change = []; | |
| } | |
| function jsonPath(obj,string) { |
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
| ul { | |
| min-height: 6em; | |
| width: 100%; | |
| text-align: center; | |
| margin:0px; | |
| display:-webkit-box; | |
| display:-moz-box; | |
| display:box; | |
| -webkit-box-orient:horizontal; | |
| -moz-box-orient:horizontal; |
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 (root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define([], factory); | |
| } else if (typeof exports === 'object') { | |
| module.exports = factory(); | |
| } else { | |
| root.Injector = factory(); | |
| } | |
| }(this, function () { | |
| return function Injector(injectors) {'use strict'; |
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 typeOf(object) { | |
| if(object && "name" in object.constructor) { | |
| return object.constructor.name; | |
| } | |
| if(typeof object === 'number' && object !== object) { | |
| return 'NaN'; | |
| } | |
| var type = Object.prototype.toString.call(object); | |
| return type.substring(8,type.length-1); | |
| } |
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 (root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['injector'], factory); | |
| } else if (typeof exports === 'object') { | |
| module.exports = factory(require('./injector')); | |
| } else { | |
| root.namespace = factory(root.Injector); | |
| } | |
| }(this, function (Injector) { | |
| var spaces = {}; |
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 (root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define([], factory); | |
| } else if (typeof exports === 'object') { | |
| module.exports = factory(); | |
| } else { | |
| root.Promise = factory(); | |
| } | |
| }(this, function () { | |
| function Promise(init) { |
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
| <link rel="import" href="../polymer/polymer.html"> | |
| <polymer-element name="my-element" attributes="show left right open"> | |
| <template> | |
| <style> | |
| :host { | |
| display block; | |
| width: 100%; | |
| box-sizing: border-box; |
OlderNewer