Skip to content

Commit

Permalink
Internal syntax changes for chain method. #18
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Windle committed May 28, 2013
1 parent 2bd1566 commit 64077ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions js/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,20 @@ var Sketch = (function() {

function chain( target ) {

extend( target, {
for ( var key in target )

if ( isFunction( target[ key ] ) )

target[ key ] = proxy( target[ key ], target );

return extend( target, {

set: function( key, val ) {

if ( isString( key ) ) target[ key ] = val;
else extend( target, key, true );
}
});

for ( var key in target )

if ( isFunction( target[ key ] ) )

target[ key ] = proxy( target[ key ], target );

return target;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion js/sketch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 64077ed

Please sign in to comment.