From beb912ee83696ef54203029b9667e073df75407f Mon Sep 17 00:00:00 2001 From: Aliaksei Chapyzhenka Date: Sun, 10 Nov 2019 18:12:07 -0800 Subject: [PATCH] library refactoring --- lib/and.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/and.js b/lib/and.js index 2d9bd4f..3bb47a1 100644 --- a/lib/and.js +++ b/lib/and.js @@ -1,6 +1,6 @@ 'use strict'; -exports.and = () => { +module.exports = () => { let state = 0; // idle let total = 0; let start = 0; @@ -45,21 +45,3 @@ exports.and = () => { time: () => total + start }; }; - - -exports.activity = skip => { - let start = 0; - let stop = 0; - return { - on: time => { - if (time > skip) { - if (start == 0) { - start = time; - } else { - stop = time; - } - } - }, - time: () => stop - start - }; -};