node-version.js 227 B

12345678910
  1. 'use strict';
  2. var match = process.version.match(/v(\d+)\.(\d+)\.(\d+)/);
  3. var nodeVersion = {
  4. major: parseInt(match[1], 10),
  5. minor: parseInt(match[2], 10),
  6. patch: parseInt(match[3], 10),
  7. };
  8. module.exports = nodeVersion;