const ScriptHelper = { execute ( scriptStr , options ) { return Function ( '"use strict";return (' + scriptStr + ')' ) ( ) ( options ) ; } , executeEl ( callObject , logicStr ) { return Function ( '"use strict";return (function(){ return ' + logicStr + '})' ) ( ) . call ( callObject ) ; } , } ; param obj param path param value export const set = ( obj , path , value ) : void => { let schema = obj ; const pList = path . split ( '.' ) ; const len = pList . length ; for ( let i = 0 ; i < len - 1 ; i ++ ) { const elem = String ( pList [ i ] ) ; schema = schema [ elem ] || { } ; } schema [ pList [ len - 1 ] ] = value ; } ; param path param obj export const resolve = ( path , obj ) : unknown => { return path . split ( '.' ) . reduce ( function ( prev , curr ) { return prev ? prev [ curr ] : null ; } , obj || self ) ; } ; export default ScriptHelper ;