From 1db0ee1c1465722b2642c3cc0166bdf69e9312f2 Mon Sep 17 00:00:00 2001 From: Clay Diffrient Date: Thu, 13 Apr 2017 08:18:45 -0600 Subject: [PATCH] [fixed] remove es2015 from v1 branch closes #375 --- lib/helpers/refCount.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/helpers/refCount.js b/lib/helpers/refCount.js index 8bcfdd49..76a84c97 100644 --- a/lib/helpers/refCount.js +++ b/lib/helpers/refCount.js @@ -1,19 +1,19 @@ -const modals = []; +var modals = []; -export function add (element) { - if (modals.indexOf(element) === -1) { - modals.push(element); +module.exports = { + add (element) { + if (modals.indexOf(element) === -1) { + modals.push(element); + } + }, + remove (element) { + const index = modals.indexOf(element); + if (index === -1) { + return; + } + modals.splice(index, 1); + }, + count () { + return modals.length; } -} - -export function remove (element) { - const index = modals.indexOf(element); - if (index === -1) { - return; - } - modals.splice(index, 1); -} - -export function count () { - return modals.length; -} +};