Permalink
Browse files

Added documentation on the new operator

  • Loading branch information...
1 parent 05c7f43 commit b40641a996a7560dde6a2c72e45a4540d38598c9 @Leonidas-from-XIV committed Jun 12, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.md
View
@@ -94,6 +94,12 @@ fs.readFile __dirname + '/foo.xml', (err, data) ->
console.log 'Done.'
```
+But what happens if you forget the `new` keyword to create a new `Parser`? In
+the middle of a nightly coding session, it might get lost, after all. Worry
+not, we got you covered! Starting with 0.2.8 you can also leave it out, in
+which case `xml2js` will helpfully add it for you, no bad surprises and
+inexplicable bugs!
+
"Traditional" usage
-------------------

0 comments on commit b40641a

Please sign in to comment.