abstract-type
Version:
The abstract-type library includes the abstract `Type` class and `Value` class for streamable type info and validating value.
49 lines (37 loc) • 1.15 kB
JavaScript
(function() {
var Attributes, TypeAttributes, inherits;
inherits = require('inherits-ex/lib/inherits');
Attributes = require('property-manager/lib/properties');
module.exports = TypeAttributes = (function() {
var attrs;
inherits(TypeAttributes, Attributes);
TypeAttributes.attrs = attrs = {
name: {
required: true,
enumerable: false,
exported: true,
assigned: true,
type: 'String'
},
required: {
type: 'Boolean'
},
customValidate: {
alias: ['custom-validate', 'validate'],
type: 'function'
}
};
function TypeAttributes(aOptions, nonExported1stChar) {
if (!(this instanceof TypeAttributes)) {
return new TypeAttributes(aOptions, nonExported1stChar);
}
return TypeAttributes.__super__.constructor.call(this, aOptions, nonExported1stChar);
}
TypeAttributes.prototype._initialize = function(aOptions) {
this.merge(attrs);
TypeAttributes.__super__._initialize.call(this, aOptions);
};
return TypeAttributes;
})();
}).call(this);
//# sourceMappingURL=index.js.map