11'use strict' ;
22
3- var Store = require ( './store' )
4- , Namespace = require ( './namespace' )
5- , AppComponents = require ( './components' ) ;
3+ const Store = require ( './store' ) ;
4+ const Namespace = require ( './namespace' ) ;
5+ const AppComponents = require ( './components' ) ;
6+ const injector = require ( 'object-injector' ) ;
67
78/**
89 * @class AppInstance
@@ -13,11 +14,10 @@ var Store = require('./store')
1314 * @param {String[] } [dependencies] - A list of packages that instance
1415 * depends
1516 */
16- module . exports = function ( namespace , dependencies ) {
17-
18- if ( ! Namespace . checker ( namespace ) ) throw new Error (
19- "Specified namespace is invalid"
20- ) ;
17+ module . exports = function ( namespace , dependencies ) {
18+ if ( ! Namespace . checker ( namespace ) ) {
19+ throw new Error ( 'Specified namespace is invalid' ) ;
20+ }
2121
2222 var components = new AppComponents ( ) ;
2323 injector ( this , components ) ;
@@ -47,8 +47,7 @@ module.exports = function(namespace, dependencies){
4747 * @description Shortcut for long schema skeleton of namespace.
4848 * @return {Object } The skeleton of the application, including namespaces.
4949 */
50- this . getSkeleton = function ( ) {
51- return Namespace . generator ( namespace , { } , this . getComponents ) ;
50+ this . getSkeleton = function ( ) {
51+ return Namespace . generator ( namespace , this . getComponents ) ;
5252 } ;
53-
5453} ;
0 commit comments