From 1a6b41052d82c8652b6962dcfbb63fc073dcb629 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Tue, 9 Jan 2018 21:55:40 +0100 Subject: [PATCH] Use "var" instead of const, in order to support node 0.12 --- .travis.yml | 1 + index.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6519f6..e47a9c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ sudo: false language: "node_js" node_js: + - "0.12" - "4" - "6" - "8" diff --git a/index.js b/index.js index 8d90f3c..b970bc2 100644 --- a/index.js +++ b/index.js @@ -7,8 +7,9 @@ 'use strict' -const versionStr = process.version.match(/v(\d+).*/)[1] -const majorVersion = Number(versionStr) +// Use "var" instead of const, in order to support node 0.10 +var versionStr = process.version.match(/v(\d+).*/)[1] +var majorVersion = Number(versionStr) if (majorVersion >= 8) { require('trace') require('clarify')