UNPKG

invoice-fs

Version:

Nostalgic command-line invoicing application producing plain text invoices and JSON data structures. Uses the file system as a database

28 lines (23 loc) 699 B
var obj = require('javascript-object-paraphernalia'), EditFlowType = require('./editFlowType'); function EditFlowStep(options, property) { this.label = null; this.property = null; this.matches = /^[&$@\.,\+\-_()A-Za-z0-9\s]*$/; this.type = EditFlowType.String; this.required = false; this.default = ""; this.format = function(value) { return value; }; if (options.constructor === Object) { obj.apply(this, options); } else { this.label = options; this.property = property; } if (!this.label || !this.property) { throw new Error("Required parameters are missing"); } } module.exports = EditFlowStep;