Last Updated: February 25, 2016
·
558
· gdotdesign

Wrap BlockStatements in try..catch

falafel = require('falafel')
output = falafel code, (node)->
  if node.type is 'BlockStatement'
    node.update('{try{' + node.source()[1..-2] + '}catch(e){}}');