var hiddenStore = require('./hidden-store.js');

module.exports = createStore;

function createStore() {
    var key = {};

    return function (obj) {
        if (typeof obj !== 'object' || obj === null) {
            throw new Error('Weakmap-shim: Key must be object')
        }

        var store = obj.valueOf(key);
        return store && store.identity === key ?
            store : hiddenStore(obj, key);
    };
}

@@ -156,16 +156,17 @@
      if 
+(
 (typeof 
@@ -198,16 +198,67 @@
 == null)
+ &&%0A            typeof obj !== 'function'%0A        )
  %7B%0A     

support functions in create-store