You are reading a single comment by @Wilberforce and its replies. Click here to read the full conversation.
  • I wondering the best way to handle this, and the best way to set modules up for child and parent relationships.

    Using a filesystem as an example, say we have 
    var myfs=require('FileSystem');
    
    var file=myfs.createFile('test.txt');
    file.write( 'data');
    file.close();
    

    Do we have a single module that contains both the FileSystem and File objects?

    I want file to have a reference to it's parent, and have it's own methods.

    Should this be set up as two modules, where Filesystem is a list of File objects?

    I've not seen any modules that contain two or related classes.

About

Avatar for Wilberforce @Wilberforce started