diff --git a/index.js b/index.js index d8135b65..a2474f7b 100644 --- a/index.js +++ b/index.js @@ -3,5 +3,9 @@ exports.AbstractClass = require('./lib/abstract-class').AbstractClass; exports.Validatable = require('./lib/validatable').Validatable; try { - exports.version = require('./package.json').version; + if (process.versions.node < '0.6' || true) { + exports.version = JSON.parse(fs.readFileSync(process.cwd() + '/package.json')).version; + } else { + exports.version = require('../package').version; + } } catch(e) {}