Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function instanceObject(name, type, data){
  2.     var toInstance = hash[type][name];
  3.     if( toInstance !== false ){
  4.         console.log('toInstance...', util.inspect( toInstance, null, 0 ));
  5. /*log:
  6. toInstance... { name: 'default',
  7.   id: 'default',
  8.   type: 'player',
  9.   vars: [Object],
  10.   events: [Object],
  11.   options: [],
  12.   size: 1972,
  13.   json: [Object] }
  14. */
  15.         var instance = Object.create( toInstance );
  16. /*log:
  17. instance... {}
  18. */
  19.         console.log('instance...', util.inspect( instance, null, 0 ));
  20.        
  21.         return instance;
  22.     }
  23.     return false;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement