Skip to content
Browse files

Simplify CoffeeScript example

Use destructured assignment
  • Loading branch information...
1 parent 815c972 commit 91cf497ccad0291006689a0e90d6f87b6fe47c6a @kevinsawicki kevinsawicki committed Jul 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
2 README.md
@@ -44,7 +44,7 @@ Can't get easier than this, right? This works starting with `xml2js` 0.2.3.
With CoffeeScript it looks like this:
```coffeescript
-parseString = require('xml2js').parseString
+{parseString} = require 'xml2js'
xml = "<root>Hello xml2js!</root>"
parseString xml, (err, result) ->
console.dir result

0 comments on commit 91cf497

Please sign in to comment.
Something went wrong with that request. Please try again.