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 x = { | |
| "test": 1, | |
| "test2": 2, | |
| "testArray": [1,2,3,4] | |
| }; | |
| console.log('TEST',x); | |
| /** | |
| * OUTPUT |
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
| /** | |
| * Require the given path. | |
| * | |
| * @param {String} path | |
| * @return {Object} exports | |
| * @api public | |
| */ | |
| function require(path, parent, orig) { | |
| var resolved = require.resolve(path); |
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
| /** | |
| * two way data binding | |
| */ | |
| // create root scope | |
| window.$rootScope = {}; | |
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
| /** | |
| * Available node core libraries | |
| */ | |
| var node = require('node') | |
| , assert = node.assert | |
| , buffer = node.buffer | |
| , events = node.events | |
| , net = node.net | |
| , stream = node.stream |
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
| /** | |
| * Expose `Stream`. | |
| */ | |
| if ('undefined' !== typeof module) { | |
| module.exports = Stream; | |
| } | |
| /** |
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
| /*! | |
| * Event Emitters | |
| */ | |
| /** | |
| * Initialize a new `Emitter`. | |
| * | |
| * @api public | |
| */ |
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 XMLHttpRequest() { | |
| // titanium xhr client | |
| this._proxy = Ti.Network.createHTTPClient(); | |
| // mapping for compatible functions | |
| this.getResponseHeader = this._proxy.getResponseHeader; | |
| this.open = this._proxy.open; |
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 mkdirP (p, fn, made) { | |
| if (!made) made = null; | |
| var cb = fn || function () {}; | |
| p = path.resolve(p); | |
| fs.mkdir(p, function (err) { | |
| if (!err) return cb(null, made || p); | |
| if (err.code != 'ENOENT') return err; | |
| mkdirP(path.dirname(p), mode, function (err, made) { |
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 decodeEntity(str) { | |
| var names = { | |
| 'nbsp': 160, | |
| 'lt': 60, | |
| 'gt': 62, | |
| 'amp': 38, | |
| 'cent': 162, | |
| 'pound': 163, | |
| 'yen': 164, | |
| 'euro': 8364, |
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
| package server | |
| import ( | |
| "fmt" | |
| "net/http" | |
| _ "net/http/pprof" | |
| "github.com/labstack/echo" | |
| ) |