mgscarp-openinghours
v0.1.0
Published
The opening hours model for a business.
Downloads
12
Readme
OpeningHours
The opening hours model for a business.
Check:
Installation
$ npm install mgscarp-openinghours --save
Usage
var OpeningHours = require('mgscarp-openinghours');
var data = [{
dayOfWeek: 'Monday',
hours: [{
opens: '15:00',
closes: '21:00'
}]
}, {
dayOfWeek: 'Monday',
hours: [{
opens: '15:00',
closes: '21:00'
}]
}];
var hours = new OpeningHours(data);
// returns 'Mo,Tu 15:00-21:00'
hours.serialize();
Tests
Run tests with Mocha
$ make test