fix jhint errors
This commit is contained in:
parent
587bcbcbc8
commit
4740173d3e
@ -11,16 +11,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// merge default settings with user settings
|
// merge default settings with user settings
|
||||||
var settings = settings || {};
|
settings = settings || {};
|
||||||
this.settings = {};
|
this.settings = {};
|
||||||
|
for (var d in defaults) { this.settings[d] = defaults[d]; }
|
||||||
for (var property in defaults) {
|
for (var s in settings) { this.settings[s] = settings[s]; }
|
||||||
this.settings[property] = defaults[property];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var property in settings) {
|
|
||||||
this.settings[property] = settings[property];
|
|
||||||
}
|
|
||||||
|
|
||||||
// time units
|
// time units
|
||||||
this.units = {
|
this.units = {
|
||||||
@ -101,12 +95,12 @@
|
|||||||
|
|
||||||
// return total, convert if needed
|
// return total, convert if needed
|
||||||
return (returnUnit) ? convert(totalSeconds, returnUnit) : totalSeconds;
|
return (returnUnit) ? convert(totalSeconds, returnUnit) : totalSeconds;
|
||||||
}
|
};
|
||||||
|
|
||||||
// add convenience method to string prototype
|
// add convenience method to string prototype
|
||||||
String.prototype.parseTime = function (unit, settings) {
|
String.prototype.parseTime = function (unit, settings) {
|
||||||
return (new Timestring(settings)).parse(this, unit);
|
return (new Timestring(settings)).parse(this, unit);
|
||||||
}
|
};
|
||||||
|
|
||||||
// export Timestring object for either the browser or node
|
// export Timestring object for either the browser or node
|
||||||
if (typeof module !== 'undefined' && module.exports) {
|
if (typeof module !== 'undefined' && module.exports) {
|
||||||
|
Loading…
Reference in New Issue
Block a user