Skip to content

Commit

Permalink
chore(cleanup): Linting files
Browse files Browse the repository at this point in the history
  • Loading branch information
pilsy committed Jan 22, 2015
1 parent 3f9cad6 commit 72d09f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/classes/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ var Controller = require( 'clever-controller' )
module.exports = Controller.extend(
/* @Static */
{
app: injector.getInstance( 'app' ),
service: null
app : injector.getInstance( 'app' ),
service : null
},
/* @Prototype */
{
Expand Down
4 changes: 1 addition & 3 deletions lib/classes/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ Module = exports.Class = Class.extend(
this.name = _name;

// Set our config if there is any
this.config = typeof config[ _name ] === 'object'
? config[ _name ]
: {};
this.config = typeof config[ _name ] === 'object' ? config[ _name ] : {};

// Set the modules location
this.path = _path;
Expand Down
18 changes: 7 additions & 11 deletions lib/classes/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,15 @@ Service = exports.Class = Class.extend(
});

exports.extend = function() {
var extendingArgs = [].slice.call( arguments )
, serviceName = ( typeof extendingArgs[ 0 ] === 'string' )
? extendingArgs.shift()
: false
, Static = ( extendingArgs.length === 2 )
? extendingArgs.shift()
: {}
, Proto = extendingArgs.shift();
var extendingArgs = [].slice.call( arguments )
, serviceName = ( typeof extendingArgs[ 0 ] === 'string' ) ? extendingArgs.shift() : false
, Static = ( extendingArgs.length === 2 ) ? extendingArgs.shift() : {}
, Proto = extendingArgs.shift();

if ( !serviceName ) {
var Reg = new RegExp( '.*\\(([^\\)]+)\\:.*\\:.*\\)', 'ig' )
, stack = new Error().stack.split( '\n' )
, file = stack.splice( 2, 1 );
var Reg = new RegExp( '.*\\(([^\\)]+)\\:.*\\:.*\\)', 'ig' )
, stack = new Error().stack.split( '\n' )
, file = stack.splice( 2, 1 );

if ( Reg.test( file ) ) {
serviceName = RegExp.$1.split( path.sep ).pop().replace( '.js', '' );
Expand Down

0 comments on commit 72d09f8

Please sign in to comment.