Skip to content

Instantly share code, notes, and snippets.

@franz-see
Created September 20, 2014 19:18
Show Gist options
  • Save franz-see/6157e30dcf88183b27ea to your computer and use it in GitHub Desktop.
Save franz-see/6157e30dcf88183b27ea to your computer and use it in GitHub Desktop.
com = typeof(com) !== 'undefined' ? com : {};
com.pinoyjug = com.pinoyjug || {};
com.pinoyjug.JSThread = function(/* key-value constructor param */ config) {
// private
var _private_val = 5;
var _private_func = function() { ... {;
// public
return {
public_val : _private_val,
public_func : _private_fun
};
};
var jsThread = new com.pinoyjug.JSThread({'key':'value'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment