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(callback) { | |
| if (someCond) return void callback(); | |
| // do things | |
| return "some 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
| { | |
| "name": "Ashe's Pokedex", | |
| "sort": "byName", | |
| "order": "descending", | |
| "pokemon": [ | |
| { | |
| "id": 4, | |
| "name": "Charmander", | |
| "types": "fire", | |
| "species": "lizard", |
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
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => { | |
| return [1, 2, 3]; |
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
| // some pieces of this file have been omitted | |
| let React = require('react') | |
| let notesStore = require('../../stores/notesStore') | |
| let monitorMixin = require('../../mixins/monitorMixin') | |
| let Notes = React.createClass({ | |
| mixins: [monitorMixin(notesStore)] | |
| // this gets called whenever `notesStore` emits a change event |
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
| let validActions = { | |
| [GameConstants.GAME_CREATE]: null, | |
| [GameConstants.GAME_JOIN]: null, | |
| [GameConstants.GAME_EXIT]: null, | |
| [GameConstants.USER_JOINED]: null, | |
| [GameConstants.USER_LEFT]: null | |
| } | |
| GameDispatcher.register( ({actionType, data}) => { | |
| if (actionType in validActions) { |
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
| /** | |
| * Ref $elector Mixin | |
| */ | |
| export default { | |
| $(ref) { | |
| return this.refs[ref].getDOMNode() | |
| } | |
| } |
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
| /** | |
| * Somewhere in an app module, pull in the app specific translator | |
| */ | |
| import t from 'util/translate' | |
| t("Edu_bs") | |
| // => "Bachelor's" |
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
| javascript:(function(){function t(){this.types={}}function e(t,e){this.el=t,this.registry=e,this.init()}t.prototype={register:function(t){var e=t.type;this.types[e]=this.types[e]||[],this.types[e].push(t)},createNavigation:function(){var t=document.createElement("div");t.className="table-of-contents clearfix";var e=document.createElement("div");e.className="btn-group right",i.parentNode.insertBefore(t,i.nextSibling),t.appendChild(e),Object.keys(this.types).forEach(function(t){var i=!0,n=document.createElement("button");n.textContent=t,n.className="btn btn-sm selected",e.appendChild(n),n.addEventListener("click",function(e){i=!i,n.classList.toggle("selected",i),this.types[t].forEach(function(t){t.toggle(i)},this),e.preventDefault()}.bind(this))},this)}},e.prototype={init:function(){this.visible=!0,this.cacheElements(),this.addToggleButton(),this.bindEvents(),this.registerType()},cacheElements:function(){this.header=this.el.querySelector(".file-header"),this.actions=this.el.querySelector(".file-actions"),this.c |
OlderNewer