lib/keypath.js
function _set(obj, keypath, value, hook) {
    var parts = _keyPathNormalize(keypath).split('.')
    var last = parts.pop()
    var dest = obj
    parts.forEach(function(key) {
        // Still set to non-object, just throw that error
        dest = dest[key]
    })
    if (hook) {
        // hook proxy set value
        hook(dest, last, value)
    } else {
        dest[last] = value
    }
    return obj
}
function _set(obj, keypath, value, hook) {
    var parts = _keyPathNormalize(keypath).split('.')
    var last = parts.pop()
    var dest = obj
    parts.forEach(function(key) {
        // Still set to non-object, just throw that error
        dest = dest[key]
    })
    if (hook) {
        // hook proxy set value
        hook(dest, last, value)
    } else {
        dest[last] = value
    }
    return obj
}
function _set ( obj , keypath , value , hook ) { var parts = _keyPathNormalize ( keypath ) . split ( '.' ) var last = parts . pop ( ) var dest = obj parts . forEach ( function ( key ) { // Still set to non-object, just throw that error dest = dest [ key ] } ) if ( hook ) { // hook proxy set value hook ( dest , last , value ) } else { dest [ last ] = value } return obj }
set value to object by keypath
set value to object by keypath