Skip to content

Instantly share code, notes, and snippets.

@GerryFudd
GerryFudd / moduleExample.js
Created March 5, 2015 19:11
Example of a module pattern
var module = (function(input) {
var localVariable = 4;
var my = {};
my.shout = function() {
console.log('module.value is ' + this.value);
console.log('input is ' + input);
console.log('globalVariable is ' + globalVariable);
};
my.method = function() {
my.value = localVariable;
2016-07-26 14:05:13.738 xcodebuild[65319:27180077] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-10150/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/ProjectModel/Runtime/PBXPListArchiving.m:984
Details: archiveObjectVersionString should be an instance inheriting from NSString, but it is <__NSCFNumber: 0x2e37>
Object: <PBXPListUnarchiver: 0x7feef813aef0>
Method: -decodeRootObject
Thread: <NSThread: 0x7feef3615270>{number = 1, name = main}