MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / sortByDate

Function sortByDate

services/holidays/index.js:158–168  ·  view source on GitHub ↗
(holidays)

Source from the content-addressed store, hash-verified

156}
157
158function sortByDate(holidays) {
159 return holidays.sort((a, b) => {
160 if (a.date > b.date) {
161 return 1;
162 }
163 if (a.date < b.date) {
164 return -1;
165 }
166 return 0;
167 });
168}
169
170export default function getHolidays(year) {
171 const easterHolidays = getEasterHolidays(year);

Callers 1

getHolidaysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected