Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <script src="https://npmcdn.com/lodash"></script>
    <title>JS Bin</title>
  </head>
  <body>
    Input
    <br />
    <textarea id="input" name="" id="" cols="100" rows="10"></textarea>
    <br />
    Output
    <br />
    <textarea id="output" name="" id="" cols="100" rows="10"></textarea>
  </body>
</html>
 
console.clear()
const input = document.getElementById('input')
const output = document.getElementById('output')
input.addEventListener('keyup', onKeyUp)
input.value = `
mso-line-height-rule: exactly;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
word-break: break-word;
color: #656565;
font-family: Helvetica;
font-size: 12px;
line-height: 150%;
text-align: left;
`.trim()
onKeyUp()
function onKeyUp() {
  const {value} = input
  const items = value.split('\n')
  output.value = items
    .filter(i => !!i)
    .map(i => {
      let [prop, val] = i.split(': ')
      prop = _.camelCase(prop)
      return prop + ': \'' + val.substr(0, val.length-1) + '\','
    })
    .join('\n')
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
kentcdoddspro
0viewers