Skip to content

Instantly share code, notes, and snippets.

View sebmck's full-sized avatar

Sebastian sebmck

  • 23:02 (UTC -05:00)
View GitHub Profile
const parsed = { type: "File", program: parse(unsorted) };
// Find all imports
let imports = []
traverse(parsed, {
ImportDeclaration(node, parent) {
imports.push({node, text: unsorted.substring(node.start, node.end)});
}
});
@sebmck
sebmck / Column.js
Created September 16, 2015 03:35 — forked from ryanflorence/Column.js
import React from 'react';
import { Flex } from 'jsxstyle';
class Column extends React.Component {
render () {
return <Flex {...this.props} direction="column"/>;
}
}
export default Column;
interface LoginNavState {
showLoginOptions: boolean
}
class LoginNav extends React.Component<{}, LoginNavState> {
constructor() {
super()
this.state = {
showLoginOptions: false
function getValues () {
return {
a: 1,
b: 2
};
}
let {a, b} = getValues();
console.log(a, b);