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
"use strict"; | |
/* global window */ | |
/* global define */ | |
/* global KISSY */ | |
/* | |
https://gist.github.com/nuysoft/7974409 | |
*/ |
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
{ | |
"type": "program", | |
"statements": [ | |
{ | |
"type": "mustache", | |
"strip": { | |
"left": false, | |
"right": false | |
}, | |
"escaped": true, |
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
function parse(result) { | |
var cursor = 1, | |
arr = [] | |
while (cursor <= result) { | |
if (result & cursor) arr.push(cursor) | |
cursor *= 2 | |
} | |
console.log(arr) | |
} |
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
var hooks = { | |
foo: function() { | |
console.log(this) | |
}, | |
_default: function() { | |
console.log(this) | |
} | |
} | |
owner.foo() // hooks |
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 store from './store' | |
export function render (container: any) { | |
if (!container) { | |
container = document.createElement('div') | |
container.id = ENGINE_CONTAINER | |
document.body.appendChild(container) | |
} | |
ReactDOM.render( |
OlderNewer