From 4740173d3e33d8a5645823bcada4f892f16bf52a Mon Sep 17 00:00:00 2001 From: Mike Barrett Date: Thu, 17 Jul 2014 22:10:24 +0100 Subject: [PATCH] fix jhint errors --- src/timestring.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/timestring.js b/src/timestring.js index d3698b4..c84ad2c 100644 --- a/src/timestring.js +++ b/src/timestring.js @@ -11,16 +11,10 @@ }; // merge default settings with user settings - var settings = settings || {}; + settings = settings || {}; this.settings = {}; - - for (var property in defaults) { - this.settings[property] = defaults[property]; - } - - for (var property in settings) { - this.settings[property] = settings[property]; - } + for (var d in defaults) { this.settings[d] = defaults[d]; } + for (var s in settings) { this.settings[s] = settings[s]; } // time units this.units = { @@ -101,12 +95,12 @@ // return total, convert if needed return (returnUnit) ? convert(totalSeconds, returnUnit) : totalSeconds; - } + }; // add convenience method to string prototype String.prototype.parseTime = function (unit, settings) { return (new Timestring(settings)).parse(this, unit); - } + }; // export Timestring object for either the browser or node if (typeof module !== 'undefined' && module.exports) {