Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from merencia/node8
Update to Node v6.9.0 (LTS)
- Loading branch information
Showing
47 changed files
with
530 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
'use strict'; | ||
module.exports = (function() { | ||
module.exports = (() => { | ||
var weekDays = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', | ||
'friday', 'saturday']; | ||
var shortWeekDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; | ||
|
||
function convertWeekDays(expression){ | ||
expression = expression.replace('7', '0'); | ||
expression = convertWeekDayName(expression, weekDays); | ||
return convertWeekDayName(expression, shortWeekDays); | ||
} | ||
|
||
function convertWeekDayName(expression, items){ | ||
for(var i = 0; i < items.length; i++){ | ||
expression = expression.replace(new RegExp(items[i], 'gi'), parseInt(i, 10)); | ||
} | ||
return expression; | ||
} | ||
|
||
function convertWeekDays(expression){ | ||
expression = expression.replace('7', '0'); | ||
expression = convertWeekDayName(expression, weekDays); | ||
return convertWeekDayName(expression, shortWeekDays); | ||
} | ||
|
||
return convertWeekDays; | ||
}()); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.