This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
counter: 0, | |
callCount: 0, | |
ocallCount: 0, | |
setCounter: Ember.on('init', function(){ |
This file contains 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
import Ember from 'ember'; | |
var fib = function(n){ | |
switch(n){ | |
case 0: return 0; | |
case 1: return 1; | |
default: return fib(n-1) + fib(n-2); | |
} | |
}; |
This file contains 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
import Ember from 'ember'; | |
var fib = function(n){ | |
switch(n){ | |
case 0: return 0; | |
case 1: return 1; | |
default: return fib(n-1) + fib(n-2); | |
} | |
}; |
This file contains 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
import Ember from 'ember'; | |
var ComputedProto = Object.getPrototypeOf(Ember.computed(function(){})); | |
var isComputed = function(obj){ | |
return typeof(obj) === 'object' && ComputedProto.isPrototypeOf(obj); | |
} | |
var ObserverProto = Object.getPrototypeOf(Ember.observer(function(){})); | |
var isObserver = function(obj){ | |
return typeof(obj) === 'function' && ObserverProto.isPrototypeOf(obj); | |
} |
This file contains 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
import Ember from 'ember'; | |
import GraphCreator from '../lib/GraphCreator'; | |
const style = ` | |
body{ | |
margin: 0; | |
padding: 0; | |
overflow:hidden; | |
} |