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
/** @jsx React.DOM */ | |
var React = require("react"); | |
class HelloWorld { | |
getInitialState() { | |
return { | |
name: null | |
}; | |
} |
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
{"hello": "world"} |
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
const parse = require('svg-path-parser'); | |
const d = 'M198.314 131.725h-54.766c-1.458 0-1.988-1.32-1.148-2.51l16.032-21.349c.84-1.188 2.385-1.408 3.445-.352l3.136 3.125c1.06 1.057 2.65.969 3.577-.176l7.553-9.156c.927-1.144 2.385-1.056 3.224.132l20.096 27.777c.883 1.188.353 2.509-1.149 2.509zm-2.87-26.456c-3.136 0-5.654-2.553-5.654-5.634A5.627 5.627 0 0 1 195.443 94c3.136 0 5.654 2.553 5.654 5.635.044 3.08-2.518 5.634-5.654 5.634z'; | |
const paths = parse(d); | |
const result = paths.map( path => { | |
switch (path.code.toLowerCase()) { | |
case 'm': | |
return `${path.code}${path.x} ${path.y}`; | |
case 'l': |