Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var Thing = module.exports = function (options) {
for (var o in options) {
this[o] = options[o];
Thing.prototype.method = function (arg) {
var self = this; = 'word';
fs.readFile('/root/something', function (err, data) {
//self is still good here, who knows what 'this' might be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.