From 437e3637e43d743d25e0a14ae5c7a0e22a3a78ac Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 8 Oct 2014 19:06:18 +1100 Subject: [PATCH] add options to node usage api and remove example method call in options --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b7e67722a8..2cdbd63e4b 100644 --- a/README.md +++ b/README.md @@ -110,11 +110,11 @@ Compile and run `test.js`. ```javascript var to5 = require("6to5"); -to5.transform("code();"); +to5.transform("code();", options); -to5.transformFileSync("filename.js"); +to5.transformFileSync("filename.js", options); -to5.transformFile("filename.js", function (err, data) { +to5.transformFile("filename.js", options, function (err, data) { }); ``` @@ -122,7 +122,7 @@ to5.transformFile("filename.js", function (err, data) { ##### Options ```javascript -to5.transform("code();", { +{ // List of transformers to EXCLUDE // This is a camelised version of the name found in `features` // eg. "Arrow functions" is "arrowFunctions" @@ -144,7 +144,7 @@ to5.transform("code();", { // Format options // See https://github.com/Constellation/escodegen/wiki/API for options. format: {} -}); +} ``` #### Require hook