What's the commonly accepted pattern for representing state in Node.js

For example in classic object oriented programming I might have a class School which has an array of String representing students (not the ideal data structure but for illustration purposes only). It might look something like this

class School {
    String name;
    String[] students;
}

I could then instantiate a bunch of different schools each with a different name and different students. How does this concept translate across to Node.js? If I had a School module than a single instance is shared across the entire application. My initial thought is to represent each school as JSON object and basically pass around JSON where I would normally be passing around an instance of School. Is this the right idea and are there alternative approaches?

If the state should be hidden from the outside (i.e. protected attributes) you could do something like this:

SchoolFactory = {
    create: function(name, students) {
        students = students || [];
        // return the accessor methods
        return {
            getName: function() {
                return name;
            },
            addStudent: function(student) {
                students.push(student);
            }
            // add more methods if you need to
        }
    }
}

var school = SchoolFactory.create('Hogwarts');
console.log(school); // will not display the name or students
school.addStudent('Harry');

constructors and instances:

function School(name, students) {
  this.name = name;
  this.students = students || [];
};
School.prototype.enroll = function (student) {
  if (!~this.students.indexOf(student)) {
    this.students.push(student);
  } else {
    throw new Error("Student '" + student + "' already enrolled in " + this.name);
  }
};
var s = new School("Lakewood");
console.log(s.name);
console.log(s.students);
s.enroll("Me");
console.log(s.students);

I don't about any patterns...but if you like the modules...you can declare a school module and have a School class in it's export. Single instance won't be shared, since you'll be instantiating the class