mgscarp-openinghours-parse
v0.0.1
Published
Parse openinghours.
Downloads
14
Readme
OpeningHours Parse
Parse textual representation of OpeningHours
to collection.
Installation
$ npm install mgscarp-openinghours-parse --save
Usage
var serialize = require('mgscarp-openinghours-serialize');
var data = [
'Monday: 10:00-14:00',
'Tuesday: 10:00-14:00',
'Wednesday: 10:00-14:00'
].join('\n');
// returns [
// { from: 600, to: 840 },
// { from: 2040, to: 2280 },
// { from: 3480, to: 3720 }
// ];
serialize(data);
Tests
Run tests with Mocha
$ make test