智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/21/21c593cdfe199d65a3f1eb81848...

19 lines
400 B

var castPath = require('./castPath');
var isUndef = require('./isUndef');
exports = function(obj, path, val) {
path = castPath(path, obj);
var lastProp = path.pop();
var prop;
prop = path.shift();
while (!isUndef(prop)) {
if (!obj[prop]) obj[prop] = {};
obj = obj[prop];
prop = path.shift();
}
obj[lastProp] = val;
};
module.exports = exports;