src/store/db.js
function engine(url) {
            var ret;

            var parts = /^(\w+):/.exec(url);
            if (!parts) {
                d.fatal("Invalid engine URI", url);
            }
            try {
                var Engine = angular.injector(['ng', 'coa.store']).get('Engine' + parts[1].ucfirst());
                ret = new Engine(url);
            } catch(e) {
                d.fatal("Unable to instantiate engine for URI", url, e);
            }

            d('STORE', 'Creating an engine for URI', url, ':', ret);

            return ret;
        }
function engine(url) {
            var ret;

            var parts = /^(\w+):/.exec(url);
            if (!parts) {
                d.fatal("Invalid engine URI", url);
            }
            try {
                var Engine = angular.injector(['ng', 'coa.store']).get('Engine' + parts[1].ucfirst());
                ret = new Engine(url);
            } catch(e) {
                d.fatal("Unable to instantiate engine for URI", url, e);
            }

            d('STORE', 'Creating an engine for URI', url, ':', ret);

            return ret;
        }
function engine ( url ) { var ret ; var parts = / ^(\w+): / . exec ( url ) ; if ( ! parts ) { d . fatal ( "Invalid engine URI" , url ) ; } try { var Engine = angular . injector ( [ 'ng' , 'coa.store' ] ) . get ( 'Engine' + parts [ 1 ] . ucfirst ( ) ) ; ret = new Engine ( url ) ; } catch ( e ) { d . fatal ( "Unable to instantiate engine for URI" , url , e ) ; } d ( 'STORE' , 'Creating an engine for URI' , url , ':' , ret ) ; return ret ; }
Parse URI and instantiate appropriate storage engine.
Parse URI and instantiate appropriate storage engine .