Permalink
Browse files

also works in node < 0.5.5

  • Loading branch information...
1 parent e770bc9 commit f7525151ab391842fa09b602fada4e6e0ab3a103 @vadimg vadimg committed Sep 1, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 index.js
View
@@ -1,4 +1,10 @@
-var cc = new require('./build/Release/bigint');
+try {
+ // node.js versions < 0.5.5
+ var cc = new require('./build/default/bigint');
+} catch(e) {
+ // node.js versions >= 0.5.5
+ var cc = new require('./build/Release/bigint');
+}
var BigInt = cc.BigInt;
module.exports = BigInt;

0 comments on commit f752515

Please sign in to comment.