Skip to content

Instantly share code, notes, and snippets.

@tsiq-swyx
tsiq-swyx / egghead-storybook1.md
Created May 10, 2018 01:09
egghead-storybook1.md

yarn init -y

yarn add -D @storybook/react babel-core && yarn add react react-dom

"scripts": { "storybook": "start-storybook -p 6006 -c .storybook" }

@tsiq-swyx
tsiq-swyx / FreeGratefulOstracod.js
Created February 1, 2018 14:37
FreeGratefulOstracod created by anonymous - https://repl.it/repls/FreeGratefulOstracod
function astParse(a) {
const arr = a.split(',')
let ast = []
let currentLevel = 0
let currentNode = null
arr.forEach(tag => {
const taglevel = tag.search(/[^_]/) // gives how many underscores
const tagNode = {