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
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State | |
another event -> First State |
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
// For browser not complete support ES6, should transpile to ES5 using Babel | |
function flatten(input, output = []) { | |
if (Array.isArray(input)) { | |
input.forEach(ele => { | |
if (Array.isArray(ele)) { | |
flatten(ele, output) | |
} else { | |
output.push(ele) | |
} |
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 RingCentral = require('ringcentral') | |
var WebPhone = require('ringcentral-web-phone') | |
var appKey = '...'; | |
var appSecret = '...'; | |
var appName = '...'; | |
var appVersion = '...'; | |
var sdk = new RingCentral({ | |
appKey: appKey, | |
appSecret: appSecret, |