Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

also works in node < 0.5.5

  • Loading branch information...
commit f7525151ab391842fa09b602fada4e6e0ab3a103 1 parent e770bc9
@vadimg vadimg authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 index.js
View
8 index.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.