MCPcopy
hub / github.com/dresende/node-orm2 / set

Function set

lib/Settings.js:65–77  ·  view source on GitHub ↗
(key, value, obj)

Source from the content-addressed store, hash-verified

63}
64
65function set(key, value, obj) {
66 var p = key.indexOf(".");
67
68 if (p === -1) {
69 return obj[key] = value;
70 }
71
72 if (!obj.hasOwnProperty(key.substr(0, p))) {
73 obj[key.substr(0, p)] = {};
74 }
75
76 return set(key.substr(p + 1), value, obj[key.substr(0, p)]);
77}
78
79function get(key, def, obj) {
80 var p = key.indexOf(".");

Callers 1

SettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected