From 94f821d2a0c64a69f02a707a8a43b928ad251ec3 Mon Sep 17 00:00:00 2001 From: Snack Date: Tue, 14 Oct 2014 17:13:43 +0900 Subject: [PATCH] Make it work as node.js module --- md6.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/md6.js b/md6.js index 7f1b5c3..afb7be1 100644 --- a/md6.js +++ b/md6.js @@ -8,6 +8,10 @@ * var result = md6.hex(data); * console.log(result); // 7bfaa624f661a683be2a3b2007493006a30a7845ee1670e499927861a8e74cce * + * For node.js: + * var md6hash = require("./md6").md6hash; + * var md6 = new md6hash(); + * */ var md6hash = function() { function to_word(input) { @@ -307,3 +311,5 @@ var md6hash = function() { raw: _raw }; }; + +if(typeof exports !== "undefined") exports.md6hash = md6hash;