Plato on Github
Report Home
src/define.js
Maintainability
83.51
Lines of code
27
Difficulty
4.13
Estimated Errors
0.03
Function weight
By Complexity
By SLOC
/** * @file Entity (class, interface, attribute) definition * @since 0.1.6 */ /*#ifndef(UMD)*/ "use strict"; /*global _gpfDefineBuildTypedEntity*/ // Factory to create the correct entity type /*exported _gpfDefine*/ // Shortcut for gpf.define /*#endif*/ /** * Define an entity, see {@tutorial DEFINE} * * @param {Object} definition Entity definition * @return {Function} Entity constructor * @since 0.1.6 */ function _gpfDefine (definition) { var entityDefinition = _gpfDefineBuildTypedEntity(definition); return entityDefinition.getInstanceBuilder(); } /** * @gpf:sameas _gpfDefine * @since 0.1.6 */ gpf.define = _gpfDefine;