uber-node / zero-config

A zero configuration configuration loader
MIT License
116 stars 10 forks source link

clone non-primitives before returning result of .get() #30

Closed lxe closed 8 years ago

lxe commented 9 years ago

Fixes #29

cc @Raynos

anson627 commented 9 years ago

@lxe @Raynos this is probably what we want to do: function getKey(keyPath) { var clonedObject = deepExtend({}, configObject); if (!keyPath) { return clonedObject; }

    return getPath(clonedObject, keyPath);
}
Raynos commented 9 years ago

@anson627 +1