Skip to content

Instantly share code, notes, and snippets.

@objectiveSee
Created July 17, 2014 19:15
Show Gist options
  • Save objectiveSee/0fd6cb19b0a57235bb5f to your computer and use it in GitHub Desktop.
Save objectiveSee/0fd6cb19b0a57235bb5f to your computer and use it in GitHub Desktop.
require('../lib/globals.js');
function SerialDevice() {
return {
testObjectMethod: function() {
}
};
}
// Export this file as a module
module.exports = new SerialDevice();
var SerialDevice = require('./lib/SerialDevice.js');
var device1 = ...
var device2 = ...
// How do I create instances of the SerialDevice 'class' (I know.. classes don't exist)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment