File tree 7 files changed +40
-0
lines changed
7 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ var i = 0 ;
2
+
3
+ function count ( ) {
4
+ return ++ i ;
5
+ }
6
+
7
+ exports . counter = count ;
Original file line number Diff line number Diff line change
1
+ var count01 = require ( "./Util/counter" ) ;
2
+ var count02 = require ( "./Util/counter" ) ;
3
+
4
+ console . log ( count01 . counter ( ) ) ;
5
+ console . log ( count02 . counter ( ) ) ;
6
+ console . log ( count02 . counter ( ) ) ;
Original file line number Diff line number Diff line change
1
+ function log ( ) {
2
+ console . log ( "I'm body!" ) ;
3
+ }
4
+
5
+ exports . create = log ;
Original file line number Diff line number Diff line change
1
+ function log ( ) {
2
+ console . log ( "I'm head!" ) ;
3
+ }
4
+
5
+ exports . create = log ;
Original file line number Diff line number Diff line change
1
+ var head = require ( "./head" ) ;
2
+ var body = require ( "./body" ) ;
3
+
4
+ exports . create = function ( name ) {
5
+ return {
6
+ name :name ,
7
+ head :head . create ( ) ,
8
+ body :body . create ( )
9
+ } ;
10
+ } ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" :" cat" ,
3
+ "main" :" ./lib/main.js"
4
+ }
Original file line number Diff line number Diff line change
1
+ var cat = require ( "./lib/cat" ) ;
2
+
3
+ cat . create ( "mo" ) ;
You can’t perform that action at this time.
0 commit comments