Plato on Github
Report Home
node_modules/dreamopt/examples/date.js
Maintainability
73.10
Lines of code
15
Difficulty
12.36
Estimated Errors
0.11
Function weight
By Complexity
By SLOC
// Generated by IcedCoffeeScript 1.3.1c (function() { var options, _ref; options = require('../lib/dreamopt')([" -f, --from DATE Only process records from the given date #date"], { date: function(value, options, optionName) { if (isNaN(new Date(value))) { throw new Error("Invalid date for option " + optionName); } return new Date(value); } }); console.log("Year: " + ((_ref = options.from) != null ? _ref.getFullYear() : void 0)); }).call(this);