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 () { | |
| 'use strict'; | |
| // Code here... | |
| })(); |
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
| define(['dep1', 'dep2'], function (Dep1, Dep2) { | |
| 'use strict'; | |
| // Use Dep1 and Dep2 | |
| // return module var | |
| }); |
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(['module1', 'module2'], function (Module1, Module2) { | |
| 'use strict'; | |
| // Main Application code here, use Module1 and Module2 | |
| }); |
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 () { | |
| var app = require('express')(); | |
| var server = require('http').createServer(app); | |
| var io = require('socket.io').listen(server); | |
| server.listen(3000); | |
| app.use(express.static(__dirname + '/public')); | |
| app.use(express.bodyParser()); | |
| app.use(express.cookieParser('cookieparsersecret')); |
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 (window, undefined) { // undefined as an undefined parameter | |
| 'use strict'; | |
| var Module = null; // module definition here | |
| if (typeof module === "object" && module && typeof module.exports === "object") { | |
| module.exports = Module; // commonjs module (ndoejs...) | |
| } else if (typeof define === "function" && define.amd) { | |
| define([], function () {return Module;}); // amd module (requirejs...) | |
| } else if (typeof window === "object" && typeof window.document === "object") { |
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
| /composer.lock | |
| /vendor |
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
| <?php | |
| use Silex\Application; | |
| use Silex\ControllerProviderInterface; | |
| use Symfony\Component\HttpFoundation\Request; | |
| class CustomControllerProvider implements ControllerProviderInterface | |
| { | |
| public function connect(Application $app) | |
| { |
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
| if (window.JSON && window.JSON.parse) { | |
| try { | |
| JSON.parse(null); | |
| } catch (e) { | |
| var originalParse = JSON.parse; | |
| JSON.parse = function(value) { | |
| if (value) { | |
| return originalParse(value); | |
| } else { | |
| return value; |
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 workerWithFunction = function (func) { | |
| return new Worker(window.URL.createObjectURL( | |
| new Blob(['(' + func.toString() + ')()'], {type: 'text/javascript'}) | |
| )); | |
| }; |
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 Parent = function (arg1, arg2) { | |
| // TODO Define instance members here... | |
| }; | |
| Parent.prototype.doSomething = function (arg) { | |
| // TODO Do something... | |
| }; | |
| var Child = function (arg1, arg2) { | |
| Parent.call(this, arg1, arg2) // Call to super constructor |
OlderNewer