title: javascript singleton object per string
body: <p>I want to create an object which is singleton per a string. For example when I call <code>myObject("string1")</code> it always returns the same object but different from <code>myObject("string2")</code>.</p>