Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/promzard/example/buffer.js')
-rw-r--r--node_modules/promzard/example/buffer.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/promzard/example/buffer.js b/node_modules/promzard/example/buffer.js
new file mode 100644
index 000000000..828f9d1df
--- /dev/null
+++ b/node_modules/promzard/example/buffer.js
@@ -0,0 +1,12 @@
+var pz = require('../promzard')
+
+var path = require('path')
+var file = path.resolve(__dirname, 'substack-input.js')
+var buf = require('fs').readFileSync(file)
+var ctx = { basename: path.basename(path.dirname(file)) }
+
+pz.fromBuffer(buf, ctx, function (er, res) {
+ if (er)
+ throw er
+ console.error(JSON.stringify(res, null, 2))
+})